From patchwork Wed Jul 1 03:46:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Seymour, Shane M" X-Patchwork-Id: 6699751 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 7F314C05AC for ; Wed, 1 Jul 2015 03:48:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ED04920664 for ; Wed, 1 Jul 2015 03:48:42 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id DF5A820660 for ; Wed, 1 Jul 2015 03:48:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752298AbbGADsj (ORCPT ); Tue, 30 Jun 2015 23:48:39 -0400 Received: from g4t3426.houston.hp.com ([15.201.208.54]:36856 "EHLO g4t3426.houston.hp.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751374AbbGADsj convert rfc822-to-8bit (ORCPT ); Tue, 30 Jun 2015 23:48:39 -0400 Received: from G9W0364.americas.hpqcorp.net (g9w0364.houston.hp.com [16.216.193.45]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by g4t3426.houston.hp.com (Postfix) with ESMTPS id 5FEFC3BB; Wed, 1 Jul 2015 03:48:38 +0000 (UTC) Received: from G4W6304.americas.hpqcorp.net (16.210.26.229) by G9W0364.americas.hpqcorp.net (16.216.193.45) with Microsoft SMTP Server (TLS) id 14.3.169.1; Wed, 1 Jul 2015 03:46:30 +0000 Received: from G9W0766.americas.hpqcorp.net ([169.254.4.103]) by G4W6304.americas.hpqcorp.net ([16.210.26.229]) with mapi id 14.03.0169.001; Wed, 1 Jul 2015 03:46:30 +0000 From: "Seymour, Shane M" To: "linux-scsi@vger.kernel.org" , "James Bottomley (JBottomley@Odin.com)" , ISS StorageDev CC: "Greg KH (greg@kroah.com)" Subject: [PATCH 2/3] hpsa: Remove unneccessary variable from raid_level_show Thread-Topic: [PATCH 2/3] hpsa: Remove unneccessary variable from raid_level_show Thread-Index: AdCzrd8ZXYubl/wiRt2TTvDPgSn9Zg== Date: Wed, 1 Jul 2015 03:46:29 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [16.210.48.15] MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 Remove unneccessary variable from raid_level_show Signed-off-by: Shane Seymour Signed-off-by: Don brace --- Was not in previous patch. -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- a/drivers/scsi/hpsa.c 2015-06-30 16:15:42.631979483 -0500 +++ b/drivers/scsi/hpsa.c 2015-06-30 16:16:45.737975186 -0500 @@ -612,7 +612,6 @@ static const char * const raid_label[] = static ssize_t raid_level_show(struct device *dev, struct device_attribute *attr, char *buf) { - ssize_t l = 0; unsigned char rlevel; struct ctlr_info *h; struct scsi_device *sdev; @@ -631,16 +630,14 @@ static ssize_t raid_level_show(struct de /* Is this even a logical drive? */ if (!is_logical_dev_addr_mode(hdev->scsi3addr)) { spin_unlock_irqrestore(&h->lock, flags); - l = scnprintf(buf, PAGE_SIZE, "N/A\n"); - return l; + return scnprintf(buf, PAGE_SIZE, "N/A\n"); } rlevel = hdev->raid_level; spin_unlock_irqrestore(&h->lock, flags); if (rlevel > RAID_UNKNOWN) rlevel = RAID_UNKNOWN; - l = scnprintf(buf, PAGE_SIZE, "RAID %s\n", raid_label[rlevel]); - return l; + return scnprintf(buf, PAGE_SIZE, "RAID %s\n", raid_label[rlevel]); } static ssize_t lunid_show(struct device *dev,