Received: by 2002:ab2:3319:0:b0:1ef:7a0f:c32d with SMTP id i25csp33942lqc; Thu, 7 Mar 2024 09:30:13 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCVoZNww7BR/uQvMxIV2WHn+vIf8XACbEfVh2UjIpY5FZy26zPkenncRKKK/FgtMUU3r0u0vh6k+AFQY64Ze6D/Vk+G2/2SIfzaajkkShw== X-Google-Smtp-Source: AGHT+IEmX9TX76CcRNIVDX/H9LApE33qcgDPOfpErRhre2AeEbQGVyZxZo5y/zYuibuiHxop+KJN X-Received: by 2002:a17:907:367:b0:a44:47e3:839b with SMTP id rs7-20020a170907036700b00a4447e3839bmr14556380ejb.10.1709832612767; Thu, 07 Mar 2024 09:30:12 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1709832612; cv=pass; d=google.com; s=arc-20160816; b=D3VBZyXBdfC3GnOAFL/lxpEYbff9D9/+80SyTW0zS3EIJ15XgZsX3A3KHa62uAUSnf ExHX2LgIQJ+kNYfNLFHcr7VnZ+jlzk4onBdkvwEV9FoAiMIcCYki7JQ3jH4eevW5T1lo aipyx7YnvXrZS+KVgWQcOx/S83OXDhjBfO2WNZOvNmoYY630NO3r+d2IiTSklx+Lkib9 7LqfG4Z9/SAEJQWgI22fEn79YGh/wOFIfJpKA/I8oV+S/btLKTWw4V0xwtyQrQ+xyICb zKlquGCa4OzLqj5yaEDT0OZThwgSeuVS4vGc2OK1mJZXGdiCvkdYYTzAgcm1e9/eBjZQ AfXw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date; bh=qdH1I1CUVl2IE01HcOwikkvDc+JpQOlJ5qRGHjQ1W7Q=; fh=2Qio+ZtHUHoPBSd1j7frV5DI3S1LV5jXCuIVtBIb1Kk=; b=Wj94raj2FJqnm65KdErQ/FImZ5QsIXVfXT76SZ0S/Fgv+jtmqDpCrSxyjoFAGGVljd sYpO3cs+deoZPuGlJmS9Ph/t58XefkV9MbgnMKWoIJAXM9diyI9IQiju669xiIbKbch1 S7TFNin9vYESO3YcYnItL+w+H5u6284hZjbOmLAQ7oOLXNILQwHjkVJZ0HTZ1sskiLhN qmPXtgcJHaLZPaW39X9S9S2z/K/6gztdFiZzNwcTZQ0sfbNdcVK78uhmSalMXEWgtYPX E/LZR5OB0O7H8hiasRx9rzkUR8NDxV7KQX5jCKmTZWlp3zR0n/wtt96TkTwMCOxqmw6Y rIXQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-95941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id w18-20020a17090652d200b00a442272c6fcsi7130844ejn.798.2024.03.07.09.30.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 07 Mar 2024 09:30:12 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-95941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=netrider.rowland.org); spf=pass (google.com: domain of linux-kernel+bounces-95941-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-95941-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=harvard.edu Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 7DA5F1F20EED for ; Thu, 7 Mar 2024 17:30:12 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 56291130E5E; Thu, 7 Mar 2024 17:29:55 +0000 (UTC) Received: from netrider.rowland.org (netrider.rowland.org [192.131.102.5]) by smtp.subspace.kernel.org (Postfix) with SMTP id 332E2130E3C for ; Thu, 7 Mar 2024 17:29:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.131.102.5 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709832594; cv=none; b=bSdGH5oM6NHH/WuVHN1/j8wuo4R3eaqoFtwgKLHI1lTPEYEeIDAYcGcCdwFvXK7EdrKJDLlmujlTE6r6f0pfhSrxFbsTuFQ+8qlnYCyoosd+HTrOkSV7T+tDSh0qr0DUitDIYJ/hW/IJlsxjQzKS6GDKae+Oe1tCXUbm6NICTtA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1709832594; c=relaxed/simple; bh=knRagf2SaEsYlyHQSJfvNiE/tRYyl0/2a8GwXg+213Y=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=iqLd8zWTIipKyGv+wJDPmrM6Qzovu+ZYeXVUiqet2J0CD7hB1xweS6XC0f+BxicAqeNhDRMiEl2IfAD2e6Aj0Y5JDE4nJzm9MgCEGWURlsyVcIjwqRw14C/ihErPrbPC7yTFF6aoWgOrnO4afpriPyJjKQUJlbq/Rc60RHWR1Zo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu; spf=pass smtp.mailfrom=netrider.rowland.org; arc=none smtp.client-ip=192.131.102.5 Authentication-Results: smtp.subspace.kernel.org; dmarc=fail (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=netrider.rowland.org Received: (qmail 226215 invoked by uid 1000); 7 Mar 2024 12:29:51 -0500 Date: Thu, 7 Mar 2024 12:29:51 -0500 From: Alan Stern To: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= Cc: Colin Ian King , Greg Kroah-Hartman , linux-usb@vger.kernel.org, kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] usb: gadget: net2272: remove redundant variable irqflags Message-ID: <2b318367-2428-44ba-b4d9-0a452fcb7858@rowland.harvard.edu> References: <20240307105135.1981060-1-colin.i.king@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: On Thu, Mar 07, 2024 at 05:51:59PM +0100, Uwe Kleine-K?nig wrote: > On Thu, Mar 07, 2024 at 10:51:35AM +0000, Colin Ian King wrote: > > The variable irqflags is being initialized and being bit-or'd with > > values but it is never read afterwards. The variable is redundant > > and can be removed. > > > > Cleans up clang scan build warning: > > drivers/usb/gadget/udc/net2272.c:2610:15: warning: variable 'irqflags' > > set but not used [-Wunused-but-set-variable] > > > > Signed-off-by: Colin Ian King > > this "problem" exists since the driver was introduced in commit > ceb80363b2ec ("USB: net2272: driver for PLX NET2272 USB device > controller"). Might be worth a Fixes: line. > > I wonder if the better fix would be: > > diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c > index 12e76bb62c20..19bbc38f3d35 100644 > --- a/drivers/usb/gadget/udc/net2272.c > +++ b/drivers/usb/gadget/udc/net2272.c > @@ -2650,7 +2650,7 @@ net2272_plat_probe(struct platform_device *pdev) > goto err_req; > } > > - ret = net2272_probe_fin(dev, IRQF_TRIGGER_LOW); > + ret = net2272_probe_fin(dev, irqflags); > if (ret) > goto err_io; I agree, that makes much more sense. Alan Stern