From patchwork Wed Feb 24 11:21:28 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 8405491 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0D4009F2F0 for ; Wed, 24 Feb 2016 11:22:11 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 296A8202E9 for ; Wed, 24 Feb 2016 11:22:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 54835202E6 for ; Wed, 24 Feb 2016 11:22:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754362AbcBXLVx (ORCPT ); Wed, 24 Feb 2016 06:21:53 -0500 Received: from mail-pf0-f178.google.com ([209.85.192.178]:34789 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754498AbcBXLVi (ORCPT ); Wed, 24 Feb 2016 06:21:38 -0500 Received: by mail-pf0-f178.google.com with SMTP id x65so11547306pfb.1; Wed, 24 Feb 2016 03:21:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=sRY/5/27QTr8wEpkSnA2T7rejncRTlthR1F1uoHdwbA=; b=kc++8DSfGjcF4NmwpSw9E6PG+vEE2LQhLGJVqx+CiROBPthsCEBb7SmsX8kxCmGCl+ TcNpg/dgT8PeZOrEvlq6GYEpoEPKDrgO6zuS6VgOcI5WdTK+xl/vXWtXpBXGOkhP83iZ 0tOsnK70GmH8tDnVA5/YSyMaoV3adx2vzgOxMoyqEiysPFYP/I7OtaOh2PxO+7g43vWz MN4BDJHlYlES0OH8n3yij9RySK/QRUbmJ1qZ/J2sgvnuGUdxNh1EpdWMwUNCZo3sEGEM u0qAxUJdmuNVNCAIUULV7OYBIodB8V3ksfi2E1tVupL6oX9ArZdlvkz4LTYfKVre0puo B50A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=sRY/5/27QTr8wEpkSnA2T7rejncRTlthR1F1uoHdwbA=; b=gSgT4kR9bp3r4as6PqZNxotSLFvpItp82ybqXoXKQ1/K2h9JMaEHwxh0CGaesmyHvj HCy+V0yBd44XFXCVUri/YjUhcLA+s392mGTska4vn4wwoM18pVRDs63jHwfKEbH26MLP 82pQZTqSRtvQFKBxxNcsv/EygVpAqAQZGANMsgi71smx1W85yC81Nqshn4MWAB8q+p7T csaBLa5DlHC6H4EJbaeIjvGm92D0coq+f/CEOCW3hW3D7WyTmEqocH/5Nc1XSM0wQtVp j6F/LQMk1Z0O35pUcPzpBliSvB3di7iqln/WbCO6eRIMH39CQhIsCwLgH0DNbzRFb4aM 50zw== X-Gm-Message-State: AG10YOQ/S3X76ZnMHF1yvh8VOpP2AmYZTtZvLT6QJan0mffvdGwpA7s9rB7Fvsk//CZbQQ== X-Received: by 10.98.0.84 with SMTP id 81mr54142926pfa.67.1456312897834; Wed, 24 Feb 2016 03:21:37 -0800 (PST) Received: from sudip-pc.vectortproxy.org ([14.195.230.182]) by smtp.gmail.com with ESMTPSA id dz8sm4355233pab.19.2016.02.24.03.21.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 24 Feb 2016 03:21:37 -0800 (PST) From: Sudip Mukherjee To: Boaz Harrosh , Benny Halevy , "Martin K. Petersen" Cc: linux-kernel@vger.kernel.org, osd-dev@open-osd.org, linux-scsi@vger.kernel.org, Sudip Mukherjee , Joe Perches Subject: [PATCH v2] osd: remove deadcode Date: Wed, 24 Feb 2016 16:51:28 +0530 Message-Id: <1456312888-22074-1-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.9.1 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The variable is_ver1 is always true and so OSD_CAP_LEN can never be used. Reported by Coverity. Signed-off-by: Sudip Mukherjee Reviewed-by: Matthew R. Ochs --- v2: Joe Perches asked to mention the tool used in the commit log. drivers/scsi/osd/osd_initiator.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/scsi/osd/osd_initiator.c b/drivers/scsi/osd/osd_initiator.c index d8a2b51..3b11aad 100644 --- a/drivers/scsi/osd/osd_initiator.c +++ b/drivers/scsi/osd/osd_initiator.c @@ -2006,9 +2006,8 @@ EXPORT_SYMBOL(osd_sec_init_nosec_doall_caps); */ void osd_set_caps(struct osd_cdb *cdb, const void *caps) { - bool is_ver1 = true; /* NOTE: They start at same address */ - memcpy(&cdb->v1.caps, caps, is_ver1 ? OSDv1_CAP_LEN : OSD_CAP_LEN); + memcpy(&cdb->v1.caps, caps, OSDv1_CAP_LEN); } bool osd_is_sec_alldata(struct osd_security_parameters *sec_parms __unused)