Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp571909rwb; Fri, 23 Sep 2022 00:39:03 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5EXvQgbvTH+krlSJFYYIOgPFtCxRoKSCrmw47LK1pYjeKflM7uFZI7h4bUdNSqsn+eEcJd X-Received: by 2002:a05:6402:206d:b0:454:c472:f9b5 with SMTP id bd13-20020a056402206d00b00454c472f9b5mr7187281edb.388.1663918743546; Fri, 23 Sep 2022 00:39:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663918743; cv=none; d=google.com; s=arc-20160816; b=e66h0jpmhfQsv9eXz7HH3PVFEC9own6artX+id6oaCw6SQORf6+UWV79XCcwGpxPU8 ncZWZZF5uolDDi0NN+Ch3fZNG+r41bebU6GNxRdh0gDTXJueGs4SUfV2xuhzn1flwRjf T9QEYZeYdzTqaziJ8SFdXu0/q6WK3vvLwQmKXanLIUoelq5F/I0n8zS6KvzIgUDOvG8b A2h03SBR/0eJ9cprjx0IN1ZKU8nFWxubAwKhpMFCJ2ZpI4PnPemFYuvccae8VFw93fel VkJMon2IedzNnHYWcngO1FLEfwKFH9RovP+veMXVeD+I35asphVQ/s+bLCNxJsujg5N6 tzhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:references:in-reply-to :message-id:mime-version:user-agent:feedback-id:dkim-signature :dkim-signature; bh=H3fOWVl1nrig8yAtZx8mZuIdwLAEktoa3iURSPLFlcg=; b=urF48HkfvdMtyYqliJZWKIC0KvhLWSvLZm4fI2UH/U6XJYLDdKpSAJSWEsS3bT4jFo ehntnSIptwaxDk/gGSIqJhtd7FaRVOJZU/lXsIMi4t+7csioZs61N+FFnOw7RpLwySPH BCtSbBbycOWx2qrmxQZclgLYaZqlS0TK1hS/mJVRd5bemjIQ2IOAwlDm2KLHmSqopMsW 0rmcBvgkqYysgBYPqN+XEO+V6zQx2Fdmig89+PobWkM+wimcRQ99qsMfRNYOXv96Z0Xs kHXem6DFbilwNAO1/ljsWYPodK62bixru1sa5QdqTvMi7cWsp/BNf6ZGXKQWQ36UVeYh mdpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b="igscA/O5"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ue1+Nh7O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fc4-20020a1709073a4400b0077f73b07947si5487665ejc.844.2022.09.23.00.38.37; Fri, 23 Sep 2022 00:39:03 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arndb.de header.s=fm1 header.b="igscA/O5"; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=ue1+Nh7O; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229692AbiIWG7Q (ORCPT + 99 others); Fri, 23 Sep 2022 02:59:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:33306 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229997AbiIWG7O (ORCPT ); Fri, 23 Sep 2022 02:59:14 -0400 Received: from new3-smtp.messagingengine.com (new3-smtp.messagingengine.com [66.111.4.229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F0D6F11DFFF for ; Thu, 22 Sep 2022 23:59:12 -0700 (PDT) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 756E7580AAE; Fri, 23 Sep 2022 02:59:09 -0400 (EDT) Received: from imap51 ([10.202.2.101]) by compute3.internal (MEProxy); Fri, 23 Sep 2022 02:59:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arndb.de; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm1; t=1663916349; x=1663919949; bh=H3fOWVl1nr ig8yAtZx8mZuIdwLAEktoa3iURSPLFlcg=; b=igscA/O5rNCv1EWzl6YZVFYWCR Z/8wvTN0PbFRnUMFifQah81ScsX1HNVehK7auPpEd4QzzfsbpuanXPUUEtZAPYy6 63TiKgQALoogMroK4HEaYwkSTNwY+vQ54z1hBaqiGrivJvPZcOolHNPVLj66GKzf xIAjVdgZuyBxILlCx2quUwHlBDLLT4Lc4UW3L+hfwMMFt/hbv6qOCmQ/XUtDBsmG 61ARK31dQF/IgCETRhzK6Yr6LWzGhw4jI2IQX+vTIHbeFzQGjlNnfP+0jDzvkqoy L2XPiQNmmNsX9kg20u38lyatYaF3wonDNqssiRZ8v7dJtgOdatagixuvIh0g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm2; t=1663916349; x=1663919949; bh=H3fOWVl1nrig8yAtZx8mZuIdwLAE ktoa3iURSPLFlcg=; b=ue1+Nh7OsCQGWIfSgWTo102eKge/+gYTvvZkSzUhJGCy NTJ8YGCL2olpRVlrxRJfIyl47vYdiPHngv48n2F6XLfTZr0PlQkyRCGsC/fECPZR SM+naeFr+mrSR3JjHrupuCihtSvMLvDVCcRZO+eWqgz4lmjCJbZNcrUvJfv4p/gt Pzo4NlrCltAfuHc81mKU9fXrGkt1SGulDE3vH8neqJTOYy+cHC2IFOtjZMnXpOJP on6IZ8nLFoguyi8fPvwfGizHtp2jEVGZtphj6LYxxkvjEe66e3RI3PkRQPeRdOtR iLS3TtO3EJ3MyJUS0jhLcyDaqpzNOgTVDAJGfpMmxQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeefhedgudduhecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefofgggkfgjfhffhffvvefutgesthdtredtreertdenucfhrhhomhepfdet rhhnugcuuegvrhhgmhgrnhhnfdcuoegrrhhnugesrghrnhgusgdruggvqeenucggtffrrg htthgvrhhnpeffheeugeetiefhgeethfejgfdtuefggeejleehjeeutefhfeeggefhkedt keetffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe grrhhnugesrghrnhgusgdruggv X-ME-Proxy: Feedback-ID: i56a14606:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id F02A2B60086; Fri, 23 Sep 2022 02:59:07 -0400 (EDT) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.7.0-alpha0-935-ge4ccd4c47b-fm-20220914.001-ge4ccd4c4 Mime-Version: 1.0 Message-Id: In-Reply-To: References: <20220725012955.4928-1-jrdr.linux@gmail.com> Date: Fri, 23 Sep 2022 08:58:47 +0200 From: "Arnd Bergmann" To: "Dominik Brodowski" , "Souptick Joarder" Cc: "Tony Lindgren" , linux-kernel@vger.kernel.org, "kernel test robot" Subject: Re: [PATCH] pcmcia: Removed unused variable control. Content-Type: text/plain X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Sep 22, 2022, at 4:39 PM, Dominik Brodowski wrote: > Am Mon, Jul 25, 2022 at 06:59:55AM +0530 schrieb Souptick Joarder: >> From: "Souptick Joarder (HPE)" >> >> Kernel test robot throws below warning -> >> drivers/pcmcia/omap_cf.c:127:7: warning: variable 'control' >> set but not used [-Wunused-but-set-variable] >> >> Removed unused variable control. > > From a code-generation standpoint, this is obiously correct, and probably > the compiler removes that omap_readw() already. omap_readw() is an 'extern' function, so it does not get removed. Even if it was inline, it's still "and volatile" read that gets left in because it may (and probably does) have side-effects. > But, to be honest, I'm not > perfectly sure on what the device expects -- and whether it's required to > write back the control register (or parts of it). Does anyone still have the > hardware (or specs)? If not, I'm tempted to apply this patch on the basis > that the compiler might remove that omap_readw() anyway. I think assigning to an unused variable was at some point needed to avoid a compiler warning because otherwise omap_readw() was just a pointer dereference. The safe way to transform the code should be to drop the variable but leave the function call. Note that the driver is only used on the 'osk' reference board, not on any devices that were in mass-production. Arnd