From patchwork Thu May 20 09:21:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 443165 Delivered-To: patch@linaro.org Received: by 2002:a02:7a1b:0:0:0:0:0 with SMTP id a27csp2111141jac; Thu, 20 May 2021 02:26:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyBUwrv+39qEYX12ku5beSQ/cm6GcsCSu2X06EMh2898JJNHZGSN5yjle04DS9npMAr1fvl X-Received: by 2002:a6b:5a16:: with SMTP id o22mr4721575iob.63.1621502791778; Thu, 20 May 2021 02:26:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621502791; cv=none; d=google.com; s=arc-20160816; b=iWBytr0TSWVu04uBCnugOi75YA5yuhfDg4OCWhI/GjE05Bx+LMqYyl2zzYqyK+eGcW JfJr8HS9LNQKZxRlgyf3AINN9Nwum4MPfwl01AwDP3faCqgcN4bE4aVkhoMrrW3yNA+l Yi49MROi4qCyv6WA3xxpsTH/eNQD4QuCPocHiX7pQowD7z8cGsEp/jE/BXtvjECehxb/ 4Dkxoptqh5yeDOQ3hzmLA928ykegmWpiQRws0X43mf2++Pi4TvOtTwPpfGuxoV21gI2Q z489I3OzgZY9NE4S7XXdVm97kEc3CGlcFA1AYVVckxGusxznSJTDcFrflfsUZ9d7yVUu lHrQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8oeCbyb1cPeK0jWBOM10ccTp74es/gAColdRECiD2hM=; b=iJnQNATKi5vczr9lJX32vbu6BXOEvRAFnxKkJwg/sGbPEZKLn7yW+2yubJQ5bu7T2l sC8r5xtfaIIsCltDpire+ADcBSDgkVKiX6purlqW32pyp1j59g69ItFJbcUYMMXTgGOQ 0gVsWvNaFfTH75SyIRuJJys3YphdYgJiS8UlYCBDs9yk0XKbW1aM0jw+pT4kLL7p+2Lb bjK5Gw2PR3K1pGdzUjP3MS8tfZx9GvoYdLq/THPupA/ca7CSUZrosDtFK49ue5gIEfWI W5ypLx5NJrIFBLLYvdMs5V5KYS2/6WRHEOdCSDo1f3FaEIxqSAqASKCerVPFYKdMm6Ld xPSw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=Z2NWzUok; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y16si2028848jad.62.2021.05.20.02.26.31; Thu, 20 May 2021 02:26:31 -0700 (PDT) Received-SPF: pass (google.com: domain of stable-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=@linuxfoundation.org header.s=korg header.b=Z2NWzUok; spf=pass (google.com: domain of stable-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231826AbhETJ1t (ORCPT + 12 others); Thu, 20 May 2021 05:27:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:53762 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231829AbhETJ06 (ORCPT ); Thu, 20 May 2021 05:26:58 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 64CDD6121E; Thu, 20 May 2021 09:25:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1621502737; bh=DsBOTJL5ir0zrcnF3XcMFfXwg59YIrtgqteA1mt4Cyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Z2NWzUokwRi68A62TBJlSBQSZqxuLQKp9yHpldaRU0Caa3B6ntOUl8nsv9ibaQtES Zwu8rgwjD5I+7G2f9Ob6ddS93men9h+seU0NdLA3v4pvtwe97vxG16Ullz0la0jXDE 84Bn8ie1dlqlm14KBWfPTKmlYXzpk261fg0O2Hhc= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann Subject: [PATCH 5.12 05/45] usb: sl811-hcd: improve misleading indentation Date: Thu, 20 May 2021 11:21:53 +0200 Message-Id: <20210520092053.701546514@linuxfoundation.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210520092053.516042993@linuxfoundation.org> References: <20210520092053.516042993@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann commit 8460f6003a1d2633737b89c4f69d6f4c0c7c65a3 upstream. 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 Link: https://lore.kernel.org/r/20210322164244.827589-1-arnd@kernel.org Signed-off-by: Greg Kroah-Hartman --- drivers/usb/host/sl811-hcd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) --- 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)