From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75939C2D0E4 for ; Fri, 20 Nov 2020 16:38:44 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 052DA2225B for ; Fri, 20 Nov 2020 16:38:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="gLKWhjPH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 052DA2225B Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=rowland.harvard.edu Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=3lKHrCSUTUsUR5gRDmvJXhEuEIyL3GhIpQ5VjbXePhY=; b=gLKWhjPHxc426vYH6/fgQ5qaQ 8bz3X2jqvUM2n2OQytjY2FPK6Lr5VkNwi+rAsyGC42i6FURUlnQXiAQFI45dHIOrAWtjtAce9uUU0 ecu6Uq2fN0bo8ZQr7kzZZx1+Lq45YfREET23Oz6YD/+FGjTcYzgArL8PuGpdwGqPMOTa6xAm0pAi8 28ozD6w2jrAC8APwJSSh1+8DYPb6uXKRq+ggGKaHymaZMlKmpxF3szutPIDxtcGKWHJD0mDfV2Z9+ 5J1TBOZJG8KShSCvCIjhIjgOPOjm+UrY3aBUjb9W7UluL/G4TVoY5WCMBAepXpyeCzi58ctBRiZUG F/v8fzyvQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg9Pe-0003c9-Le; Fri, 20 Nov 2020 16:37:30 +0000 Received: from netrider.rowland.org ([192.131.102.5]) by merlin.infradead.org with smtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kg9Pc-0003bJ-7x for linux-arm-kernel@lists.infradead.org; Fri, 20 Nov 2020 16:37:29 +0000 Received: (qmail 620972 invoked by uid 1000); 20 Nov 2020 11:37:27 -0500 Date: Fri, 20 Nov 2020 11:37:27 -0500 From: Alan Stern To: Greg Kroah-Hartman Subject: Re: [PATCH] usb: musb: remove unused variable 'devctl' Message-ID: <20201120163727.GC619708@rowland.harvard.edu> References: <20201117082125.7619-1-min.guo@mediatek.com> <1605854930.3995.8.camel@mhfsdcap03> <1605858126.3995.14.camel@mhfsdcap03> <20201120161519.GA619708@rowland.harvard.edu> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201120_113728_373477_2373AF7C X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, chunfeng.yun@mediatek.com, linux-mediatek@lists.infradead.org, Min Guo , Matthias Brugger , Bin Liu , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Nov 20, 2020 at 05:32:44PM +0100, Greg Kroah-Hartman wrote: > On Fri, Nov 20, 2020 at 11:15:19AM -0500, Alan Stern wrote: > > > Perhaps you might want to add a comment here so that people will not > > > keep making this same mistake when they run auto-checkers on the > > > codebase? > > > > A better change would be > > > > - devctl = musb_readb(mbase, MUSB_DEVCTL); > > + (void) musb_readb(mbase, MUSB_DEVCTL); > > > > and eliminate the unused variable. Then there wouldn't be any compiler > > warning. > > No need for the (void), the compiler shouldn't warn about that, right? True, but it clearly indicates to a human reader that the value was intended to be read and thrown away. Alternatively, the (void) cast could be left out and a comment added. Alan Stern _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel