From patchwork Mon Mar 22 16:42:26 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 406170 Delivered-To: patch@linaro.org Received: by 2002:a02:8562:0:0:0:0:0 with SMTP id g89csp3721737jai; Mon, 22 Mar 2021 09:43:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyaAYe/vzSM5l4qlUog5tzSk9xddQvYQi7TD/5Zcp3Jr5g8ytLi2ajTP8nuXHEP037vTIHw X-Received: by 2002:a05:6402:51d4:: with SMTP id r20mr519265edd.112.1616431432146; Mon, 22 Mar 2021 09:43:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616431432; cv=none; d=google.com; s=arc-20160816; b=ycTUhIFZ3bVokQ6AvBJAGfUN7MNDUzlcJRpLVFxvpu41YPfMmOlAl3gHZpagWY3+/Q fR2403mdQkSKaWIshXqT56W03UP9/8tDzcHBGavfe1WQSviISazEZxQ5YOvcU+UhGWGc ObacFTarVAkaXg4xyT7ExEhvOMk7ioGC9LMI9dqau7bqMCkJIopsIlTjUsmIkB0XuZ6y RnhhDKg1KSeeE9MDK7zP7BaFe4Rq+jCYw4N3wmpGliCjX6d0mTh4eFGDgJ8X+GshnBRP zBhIcbE0XuNvP0uZgk/ug5ud0mEbG+lgvU6i+2MsqGsSioqwRJKexj8ztRxJhkx3qulA cV1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=+fYGj2Y7DeLs6TX2WoogMw5z3uVsRy+jERUwZ7STTnM=; b=rMNjuLElR/eghv6vsr/wnnMDqIyTl16/n/GL/io5lg6Iqj7NKFpcmIKhl11oG6RcNM PwAzdjz2+JYDhlU8jIPwjfLrLZ75f3Wm4h2Ey+fdoGK3Ua8jLzB0pliA9sojF1IcYGM+ XzOaY7uyGnWoc+bdkITenz6nE3C64Htlgjp5dA3+BlhePMC91uclr/2uEPS/kWf29lZa OmZg0iH3aoW7IIglc5+Tn6hw6AxoZoxGG3gD4Gw65TfWFwgXpOTWRupaoxIEOJHhANwh 1h9/LwGv4l3rigqx3U8UrfhDkC7ayqLHtQv0F7SvD8awv4r8xlbRjlmHOYX1IZRPO4hv U73w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ssrTvbEg; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c7si12357849ejp.450.2021.03.22.09.43.51; Mon, 22 Mar 2021 09:43:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ssrTvbEg; spf=pass (google.com: domain of linux-usb-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-usb-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229920AbhCVQnU (ORCPT + 3 others); Mon, 22 Mar 2021 12:43:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:35082 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229951AbhCVQms (ORCPT ); Mon, 22 Mar 2021 12:42:48 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 389D061983; Mon, 22 Mar 2021 16:42:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1616431368; bh=TAwK76ed5+zfDnDIcXVNPvbZotdftNE4vCI3pyJDoS8=; h=From:To:Cc:Subject:Date:From; b=ssrTvbEgWytbBrTzbt6A4aIg+PCmcgJBhxTBa/MNRtv30J5nzUJp0ulR+o65RyJhB ewjSbzISz4ag8EwNFbqWMBKGmAAtxf0TpKpvwZ602A/wN9njfX2m3wAHPxUugfjw/0 j8mPe8MRFDiCJ1yiQaCY2lUIOs3FEycUndBjE2QHCOugVUBXfI7pc64ki+aGanf/JI rqwoJ9Gw541SHQdetJqMsRrEJvE/j5MRJvldJaRtmCUCvY2xKft6b2JZDkioGweHky FW19vDGXxGR8hzq0XNXwWAHPb1VVutv6bCAjMsrn0bXqZLGfZ6BuH8+ZTGUElcsFyc T16omCDo7u0kg== From: Arnd Bergmann To: Greg Kroah-Hartman Cc: Arnd Bergmann , Andy Shevchenko , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] usb: sl811-hcd: improve misleading indentation Date: Mon, 22 Mar 2021 17:42:26 +0100 Message-Id: <20210322164244.827589-1-arnd@kernel.org> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Arnd Bergmann gcc-11 now warns about a confusingly indented code block: drivers/usb/host/sl811-hcd.c: In function ‘sl811h_hub_control’: drivers/usb/host/sl811-hcd.c:1291:9: error: this ‘if’ clause does not guard... [-Werror=misleading-indentation] 1291 | if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ | ^~ drivers/usb/host/sl811-hcd.c:1295:17: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the ‘if’ 1295 | break; Rewrite this to use a single if() block with the __is_defined() macro. Signed-off-by: Arnd Bergmann --- drivers/usb/host/sl811-hcd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) -- 2.29.2 diff --git a/drivers/usb/host/sl811-hcd.c b/drivers/usb/host/sl811-hcd.c index 115ced0d93e1..1be692d3cf90 100644 --- a/drivers/usb/host/sl811-hcd.c +++ b/drivers/usb/host/sl811-hcd.c @@ -1287,11 +1287,10 @@ sl811h_hub_control( goto error; put_unaligned_le32(sl811->port1, buf); -#ifndef VERBOSE - if (*(u16*)(buf+2)) /* only if wPortChange is interesting */ -#endif - dev_dbg(hcd->self.controller, "GetPortStatus %08x\n", - sl811->port1); + if (__is_defined(VERBOSE) || + *(u16*)(buf+2)) /* only if wPortChange is interesting */ + dev_dbg(hcd->self.controller, "GetPortStatus %08x\n", + sl811->port1); break; case SetPortFeature: if (wIndex != 1 || wLength != 0)