This message generated a parse failure. Raw output follows here. Please use 'back' to navigate. From devnull@lkml.org Mon Apr 29 16:36:41 2024 >From mailfetcher Sat Apr 18 08:39:52 2020 Envelope-to: lkml@grols.ch Delivery-date: Sat, 18 Apr 2020 08:39:51 +0200 Received: from stout.grols.ch [195.201.141.146] by 72459556e3a9 with IMAP (fetchmail-6.3.26) for (single-drop); Sat, 18 Apr 2020 08:39:52 +0200 (CEST) Received: from vger.kernel.org ([23.128.96.18]) by stout.grols.ch with esmtp (Exim 4.89) (envelope-from ) id 1jPh8p-0007QG-5u for lkml@grols.ch; Sat, 18 Apr 2020 08:39:51 +0200 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725879AbgDRGjt (ORCPT ); Sat, 18 Apr 2020 02:39:49 -0400 Received: from szxga06-in.huawei.com ([45.249.212.32]:46642 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725856AbgDRGjt (ORCPT ); Sat, 18 Apr 2020 02:39:49 -0400 Received: from DGGEMS410-HUB.china.huawei.com (unknown [172.30.72.58]) by Forcepoint Email with ESMTP id 50F7E2C517DEDF7A82E2; Sat, 18 Apr 2020 14:39:48 +0800 (CST) Received: from huawei.com (10.175.124.28) by DGGEMS410-HUB.china.huawei.com (10.3.19.210) with Microsoft SMTP Server id 14.3.487.0; Sat, 18 Apr 2020 14:39:39 +0800 From: Jason Yan To: , , , , , Cc: Jason Yan , Hulk Robot Subject: [PATCH] scsi: st: remove unneeded variable 'result' in st_release() Date: Sat, 18 Apr 2020 15:06:05 +0800 Message-Id: <20200418070605.11450-1-yanaijie@huawei.com> X-Mailer: git-send-email 2.21.1 Mime-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.124.28] X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-Id: X-Mailing-List: linux-kernel@vger.kernel.org Received-SPF: pass client-ip=23.128.96.18; envelope-from=linux-kernel-owner@vger.kernel.org; helo=vger.kernel.org X-Spam-Score: 3.5 X-Spam-Score-Bar: +++ X-Spam-Action: no action X-Spam-Report: Action: no action Symbol: ARC_NA(0.00) Symbol: HAS_XOIP(0.00) Symbol: FROM_HAS_DN(0.00) Symbol: TO_DN_SOME(0.00) Symbol: R_SPF_ALLOW(-0.20) Symbol: PRECEDENCE_BULK(0.00) Symbol: MIME_GOOD(-0.10) Symbol: DMARC_NA(0.00) Symbol: BAYES_HAM(-0.06) Symbol: RCV Also remove a strange '^L' after this function. Fix the following coccicheck warning: drivers/scsi/st.c:1460:5-11: Unneeded variable: "result". Return "0" on line 1473 Reported-by: Hulk Robot Signed-off-by: Jason Yan --- drivers/scsi/st.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/scsi/st.c b/drivers/scsi/st.c index c5f9b348b438..4bf4ab3b70f4 100644 --- a/drivers/scsi/st.c +++ b/drivers/scsi/st.c @@ -1457,7 +1457,6 @@ static int st_flush(struct file *filp, fl_owner_t id) accessing this tape. */ static int st_release(struct inode *inode, struct file *filp) { - int result = 0; struct scsi_tape *STp = filp->private_data; if (STp->door_locked == ST_LOCKED_AUTO) @@ -1470,9 +1469,9 @@ static int st_release(struct inode *inode, struct file *filp) scsi_autopm_put_device(STp->device); scsi_tape_put(STp); - return result; + return 0; } - + /* The checks common to both reading and writing */ static ssize_t rw_checks(struct scsi_tape *STp, struct file *filp, size_t count) { -- 2.21.1