Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2344908imm; Thu, 7 Jun 2018 09:06:24 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKuJ5aO3EPB0S7JO70LOoytlb24YUDOnaG09sxptL2nXI7GJVsXbN0W+jRK1Oonk2x1q+aD X-Received: by 2002:a62:d2c3:: with SMTP id c186-v6mr2316669pfg.44.1528387584529; Thu, 07 Jun 2018 09:06:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528387584; cv=none; d=google.com; s=arc-20160816; b=DJ2Ne1fSgiRQGVQjR7EdSX77djc0W7u+Oz4gQ+Ah2dAGc2eOBIYMA4PqZRNfocF5fB I8mq9Ih/QGYRuu10m5bhf8Qp+2e6OhZA0+uJjHE1r/XR5+7ANL6vMWmLSpI2Y+YcfDCG dQzVr5LMkRF7KAn8KW1+iRnf/6pdxeHemvkSbTTm6IJ07hofCRmeNwgEIZn0KzUzU2C/ PSS6ahcVfgcfm1y8d1G+duUCrRGIylRO8NeENwh4OYtkUGmX1J6FKYk0Sd8jK1pk88Ju PwBG5p6FPiWWT3SGBl5csBefZR4cbyPWIJcWFRV4f16cD794pWtSogB+6kTwAYGoPGj6 Q0qQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=0s0Ibx9oU1ECBPGaUP76Gz0Vingu3lcmDb2uyfFeD1I=; b=mexj90sVeMek5ZEpwYBLbRPOx0ljc5c8XucTg1RHuL3tQCdvS3muQ4x3zqO7o6m4mN AQ2NWv0imYLEV5Xq0KhJwm/e9JoE0JhMbR/LnZrodify5ZojeqWaOqaxvPnSixhT1j3r lhIXiSyFbcVJRsHJ6Leywz/vm0snLCxF+hMJlmPs5WFuadTRKExPfB/B93RndqarpyMW ZM3uO5/rUnZAnuvyQSm8+tsL8sD0DMX3Vkq4wu7/ZyWoBgmXuksZnLyYffugE+F4BBRj yHWNb5kADK2uQ297oOBQQaBNmYDkBaYYhD2fFSdW6GQqnmOs7rDLzuWCKO3EmWkmEhMh JHQg== ARC-Authentication-Results: i=1; mx.google.com; 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 3-v6si55630449plu.564.2018.06.07.09.06.09; Thu, 07 Jun 2018 09:06:24 -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; 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 S935650AbeFGQD6 (ORCPT + 99 others); Thu, 7 Jun 2018 12:03:58 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:39255 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933018AbeFGOJE (ORCPT ); Thu, 7 Jun 2018 10:09:04 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvb4-0005Zq-ID; Thu, 07 Jun 2018 15:09:02 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb1-0002pM-DJ; Thu, 07 Jun 2018 15:08:59 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Colin Ian King" , "Martin K. Petersen" , "Raghava Aditya Renukunta" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 101/410] scsi: aacraid: remove redundant setting of variable c In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Colin Ian King commit 91814744646351a470f256fbcb853fb5a7229a9f upstream. A previous commit no longer stores the contents of c, so we now have a situation where c is being updated but the value is never read. Clean up the code by removing the now redundant setting of variable c. Cleans up clang warning: drivers/scsi/aacraid/aachba.c:943:3: warning: Value stored to 'c' is never read Fixes: f4e8708d3104 ("scsi: aacraid: Fix udev inquiry race condition") Signed-off-by: Colin Ian King Reviewed-by: Raghava Aditya Renukunta Signed-off-by: Martin K. Petersen Signed-off-by: Ben Hutchings --- drivers/scsi/aacraid/aachba.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c @@ -796,11 +796,8 @@ static void setinqstr(struct aac_dev *de while (*cp == ' ') ++cp; /* last six chars reserved for vol type */ - c = 0; - if (strlen(cp) > sizeof(str->pid)) { - c = cp[sizeof(str->pid)]; + if (strlen(cp) > sizeof(str->pid)) cp[sizeof(str->pid)] = '\0'; - } inqstrcpy (cp, str->pid); kfree(cname);