Received: by 2002:a25:e7d8:0:0:0:0:0 with SMTP id e207csp1574257ybh; Fri, 13 Mar 2020 03:45:18 -0700 (PDT) X-Google-Smtp-Source: ADFU+vuqt0/wcHy0FHUv9MfyupfuKU83/VC8hdSZX2WsAL+ArItJbEtCsyHCyXG9oYbOrDv2C8JA X-Received: by 2002:aca:ec16:: with SMTP id k22mr6378524oih.177.1584096317924; Fri, 13 Mar 2020 03:45:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1584096317; cv=none; d=google.com; s=arc-20160816; b=mBZZIIQ/aNzEudr5Camvf9KA9Gy8iOTm7azsGoCayYuGQOuBQb7FE40i+UHT46KjSD 938Ha4+lXlhDU1gG+1voASN86DHwcGM5wlrq8InO/LGWLbcr5YbvvqJM08zBpPosMAtk aHsg6EDC/4WLMH3qhpC1i+v0c0Pys99/vll4Pxy8mF32+ve2fQwQOdRoPja0/H7gBNy9 bpLT/VYiZzdam9Ro59o2gAqG7KxjkCY/WdtIUh0YUV5mgNGTQ0HVj66Pye7bNch3w1kG ShUQBh9wRuYljDLkRIcpA12FZ7VVEJxvTOWxMS558+v/eRwwLZB8N8XEifx4uhkRQ46c IrGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:date:references :in-reply-to:subject:cc:to:from:dkim-signature; bh=vehheHByxk4jOsP5xz09Adnc/7niCKt/wL/dzvNbMik=; b=nyv0tDtOnGisyS2cvv/JoFbkxdpBbPx5YccJm4KTF5a0qXFUrcNEIHq1KHFLAzsdS3 WDeIOHu/PoGo/AaOC/eeyHUlVMDxqao/7XSKBiVCM+/XlTfc1u11Vk3vb5QqQrbOXkeD zRbYKtyiCP12l5dwfeh0uzusbw4D4yOQxoZWLGBNgtvkLeTVjGmGB7fzggQMG3EQ0lf+ wJ5B6FwrksZUki71gQucHz0d9sBw9fPB28/jUSC9heun159uwRdyhnJjviB5to1vyqJH i7h1afqFvU5yFPcK2vGr1vPR819l7ZkeQLRZa210vQOtrS17v3n+1Bg9fwT98jIa5yvz ETCQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=e3GcwYox; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d28si4120154otf.3.2020.03.13.03.45.04; Fri, 13 Mar 2020 03:45:17 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ellerman.id.au header.s=201909 header.b=e3GcwYox; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726455AbgCMKng (ORCPT + 99 others); Fri, 13 Mar 2020 06:43:36 -0400 Received: from ozlabs.org ([203.11.71.1]:38919 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726364AbgCMKng (ORCPT ); Fri, 13 Mar 2020 06:43:36 -0400 Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.ozlabs.org (Postfix) with ESMTPSA id 48f2Nj1nkdz9sQx; Fri, 13 Mar 2020 21:43:33 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ellerman.id.au; s=201909; t=1584096214; bh=48BTPpdnvH7ubHf8Mn96zZTm64oFJUSebhf5Q/n0y2U=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=e3GcwYoxeeUUmg4GpRStDdvnzxQK+ciVsY7yqakH7GrxIraMabyMbhFZ9i1cyXFAJ LQDeCWoPVvrQNUHqhoXMPmMEzQfS43lfBi3L26viv/f/xBCNtfEvZ0l+pALgV6hO5U OsQNJZFWHXu6j67mhmgisj+rTFIaO21BK5Yc+gWmxCN2qK+It5nqaYbxkfI/mHkxVP gFc1sUcHR3KYm97tm6aNARINaJvUBjWmYTetktYEDCkh+q0eYWbQcNiWLQP220T/1B faNwPRaJSDAjgifYpLSpCOzdBge9Zz917p3aKmffsrbmZ3IfLN+GyDqwmp0AONgJxZ W48hm3c3qjeAw== From: Michael Ellerman To: Bjorn Helgaas , Chen Zhou Cc: paulus@samba.org, tyreld@linux.ibm.com, linuxppc-dev@lists.ozlabs.org, linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH -next] PCI: rpaphp: remove set but not used variable 'value' In-Reply-To: <20200312144157.GA110750@google.com> References: <20200312144157.GA110750@google.com> Date: Fri, 13 Mar 2020 21:43:29 +1100 Message-ID: <877dzoy1pq.fsf@mpe.ellerman.id.au> MIME-Version: 1.0 Content-Type: text/plain Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Bjorn Helgaas writes: > On Thu, Mar 12, 2020 at 09:38:02AM -0500, Bjorn Helgaas wrote: >> On Thu, Mar 12, 2020 at 10:04:12PM +0800, Chen Zhou wrote: >> > Fixes gcc '-Wunused-but-set-variable' warning: >> > >> > drivers/pci/hotplug/rpaphp_core.c: In function is_php_type: >> > drivers/pci/hotplug/rpaphp_core.c:291:16: warning: >> > variable value set but not used [-Wunused-but-set-variable] >> > >> > Reported-by: Hulk Robot >> > Signed-off-by: Chen Zhou >> >> Michael, if you want this: >> >> Acked-by: Bjorn Helgaas >> >> If you don't mind, edit the subject to follow the convention, e.g., >> >> PCI: rpaphp: Remove unused variable 'value' >> >> Apparently simple_strtoul() is deprecated and we're supposed to use >> kstrtoul() instead. Looks like kstrtoul() might simplify the code a >> little, too, e.g., >> >> if (kstrtoul(drc_type, 0, &value) == 0) >> return 1; >> >> return 0; > > I guess there are several other uses of simple_strtoul() in this file. > Not sure if it's worth changing them all, just this one, or just the > patch below as-is. I'll take this patch as-is, and someone can send a follow-up to convert the whole file to kstrtoul(). cheers