From patchwork Sat Jan 20 22:09:34 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Colin Ian King X-Patchwork-Id: 863995 X-Patchwork-Delegate: boris.brezillon@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=65.50.211.133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="I3JmGZwy"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3zPBhP2bN1z9s74 for ; Sun, 21 Jan 2018 09:10:13 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TNFW4XbZupVE9bGu4gee/QcVnK2vyYtnmrwzxHOYsEA=; b=I3JmGZwyU4635q c/Rnf1bRN8WwBKRNybhnJ2i7hzejpjqDdUSckpi2629anPGb3B95sCLko3R3FQJZKpO8pJdus9hSE e53trEekf4bu690XXymY354CaJbXDapBkfRk+O7EnygDwndSWjufi3ZPxztedjzyNvCIFOdC3XsIl PQt5w9PyM6GHOJedQXBUFisZizqLRSOJ41w41zL6I1gDTr4bCddB6z0e71wDn2H330NELdyUIaBks Pv1gJgXp1im+CiPXDlqu9EgednSdK+LXAKduw0V5fLzD3HqHmit+H8+4gqh50qjAsEOkGQTUz2Kqm rWsMbADK/R+2i7dQNR9g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1ed1Kt-000801-K1; Sat, 20 Jan 2018 22:10:03 +0000 Received: from youngberry.canonical.com ([91.189.89.112]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1ed1Kq-0007nP-E8 for linux-mtd@lists.infradead.org; Sat, 20 Jan 2018 22:10:02 +0000 Received: from 1.general.cking.uk.vpn ([10.172.193.212] helo=localhost) by youngberry.canonical.com with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.76) (envelope-from ) id 1ed1KQ-0004g0-JJ; Sat, 20 Jan 2018 22:09:34 +0000 From: Colin King To: Joern Engel , David Woodhouse , Brian Norris , Boris Brezillon , Marek Vasut , Richard Weinberger , Cyrille Pitchen , linux-mtd@lists.infradead.org Subject: [PATCH] mtd: block2mtd: remove redundant initialization of 'bdev' Date: Sat, 20 Jan 2018 22:09:34 +0000 Message-Id: <20180120220934.21992-1-colin.king@canonical.com> X-Mailer: git-send-email 2.15.1 MIME-Version: 1.0 X-Spam-Note: CRM114 invocation failed X-Spam-Score: -6.9 (------) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-6.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -5.0 RCVD_IN_DNSWL_HI RBL: Sender listed at http://www.dnswl.org/, high trust [91.189.89.112 listed in list.dnswl.org] -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [91.189.89.112 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kernel-janitors@vger.kernel.org, linux-kernel@vger.kernel.org Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org From: Colin Ian King Pointer bdev is being initialized however this value is never read as bdev is assigned an updated value from the returned call to blkdev_get_by_path. Remove the redundant assignment. Cleans up clang warning: drivers/mtd/devices/block2mtd.c:228:23: warning: Value stored to 'bdev' during its initialization is never read Signed-off-by: Colin Ian King --- drivers/mtd/devices/block2mtd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/devices/block2mtd.c b/drivers/mtd/devices/block2mtd.c index 62fd6905c648..bb0734600a07 100644 --- a/drivers/mtd/devices/block2mtd.c +++ b/drivers/mtd/devices/block2mtd.c @@ -225,7 +225,7 @@ static struct block2mtd_dev *add_device(char *devname, int erase_size, int i; #endif const fmode_t mode = FMODE_READ | FMODE_WRITE | FMODE_EXCL; - struct block_device *bdev = ERR_PTR(-ENODEV); + struct block_device *bdev; struct block2mtd_dev *dev; char *name;