Message ID | 20240206085511.2841555-3-linan666@huaweicloud.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-54544-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:168b:b0:106:860b:bbdd with SMTP id ma11csp1408934dyb; Tue, 6 Feb 2024 01:01:06 -0800 (PST) X-Google-Smtp-Source: AGHT+IGzztPH0Ajx6i4DNrdY7QmGa3AfaIiD0xG0lMg0eqyCJNtsJVeR8BUSV0PrdNUuCbZ6Ona+ X-Received: by 2002:a05:6808:3020:b0:3bf:e5be:316 with SMTP id ay32-20020a056808302000b003bfe5be0316mr511229oib.25.1707210066561; Tue, 06 Feb 2024 01:01:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707210066; cv=pass; d=google.com; s=arc-20160816; b=gaPgLtvuq+0seKprOnh2lpcTnciZ6Ux2Odz8hJzHx+rpiaN7suR952P7EAi/ZKqb0o jKdb6zhofMcnLlL040muy7kONne3N2d0kj2l1QWnJTdlA4xm5oKH1tK5Qc/MeUNQwV1a lTTxE0PHQIFVg2KPVEvtveOA/HTq9SjAJ4o1Iyi3g7R4tTiFuPVxefpAB28MEK93QInL lZgY//RtE05JGSpff85ZWtDzG7UScwhvOGr3giUVGUTq1LTzrAcdQR0DJZcpJVyEkt1P AZzVE/yuTuwdBFJW8Wmos3kc5D5oYNCoNeECbcJwGaW6dyXkMOwDEuYPWVx2VhF0FKOu 5C2Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from; bh=LoW0pKOy5oPGST/bz32kJSg1pxGE1sQqgMnhxmzeUoY=; fh=yP8QqlTqpUXPbvYZpOoM+CMP6McTqzwqtbv1S4GLdC0=; b=CJQ6qEFIsdFRzX1TAWo1IoQv/QKWYPyCtaRzURYtzjV05CDUGl4NRHDhvlyC97K1j4 h8V0kM1YEqLj0LNc7648YTtx3Xm/qvCWyLwRgRcB6EtSBennknVGQ6cP6RjIEhIQRdCY fwGFqbA1aUcv9MbbJWZ9dKL+DcNKSdoCUr506DCiKC2rw5FzqXCuWhXJWChkUG4DsfD+ Ats8y6Ihd5gvkdIhlxf9mDdYssoo44GmogZtk6zwWfVzlxG9U2hsEZXctz1hbeB0odWB BFD/AEV3QoLcC43sLUdNzgdvasCC31jetBSeZcx3UCMxaxsuqhCvAsI2bkffYtXldUwG OdQQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-54544-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54544-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWOtQL0N8NlgOE/gA+agV+8Zhvb8mN86OM5VZAC9VpaF6xNK8SE5KuhNwS26w8ApEYam90VnPAycYBN0BZWKhxtxrYWOw== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id g4-20020a37e204000000b00783ff7daffcsi1832427qki.439.2024.02.06.01.01.06 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 01:01:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-54544-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=huaweicloud.com); spf=pass (google.com: domain of linux-kernel+bounces-54544-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-54544-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 55A641C21B58 for <ouuuleilei@gmail.com>; Tue, 6 Feb 2024 09:01:06 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4698212E1DC; Tue, 6 Feb 2024 09:00:00 +0000 (UTC) Received: from dggsgout11.his.huawei.com (unknown [45.249.212.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 66BCA12D152; Tue, 6 Feb 2024 08:59:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=45.249.212.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707209998; cv=none; b=TmpQKQzHO8aV19VvrEv4w+P3q5HHv3M6bOMxhwWf5MyxoUymdkG5uYiYsX8TPd8q1cw/hUuurpIq1apESDDusd2aMd+RAnQ5RHPlH3tIvj0r/9TdW2HspBkDM7rQpUemuQBqqHNBdP5kF+UfzgMDiMjuWJ+JylSCNQVK7Xpnp/Y= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707209998; c=relaxed/simple; bh=oTJkRyyWHPEDWjIBAjPNXcElGoLqKERTnxTkUCe0WUY=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Ml4K9snl5Fc6Fxltr7azXn7y9BRAYA5JwSMprepAdrf/X4w2m6EFplg66Rghm2isQlMq386Cm3daASpq0zpsQtRkZhFjng/Co5pAfLzkjVmJYwXJw8FZs0UlxZe8OcHM+Da6qqWmQcAnvaW4iI5N+h+dydR8UzgVgRhhKg2zUp0= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com; spf=pass smtp.mailfrom=huaweicloud.com; arc=none smtp.client-ip=45.249.212.51 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=huaweicloud.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=huaweicloud.com Received: from mail.maildlp.com (unknown [172.19.93.142]) by dggsgout11.his.huawei.com (SkyGuard) with ESMTP id 4TTcdL56Fpz4f3kKg; Tue, 6 Feb 2024 16:59:50 +0800 (CST) Received: from mail02.huawei.com (unknown [10.116.40.112]) by mail.maildlp.com (Postfix) with ESMTP id 777CA1A016E; Tue, 6 Feb 2024 16:59:53 +0800 (CST) Received: from huaweicloud.com (unknown [10.175.104.67]) by APP1 (Coremail) with SMTP id cCh0CgCXaBEG9cFldA+QDA--.34552S6; Tue, 06 Feb 2024 16:59:53 +0800 (CST) From: linan666@huaweicloud.com To: song@kernel.org, mariusz.tkaczyk@linux.intel.com, shli@fb.com, neilb@suse.com Cc: linux-raid@vger.kernel.org, linux-kernel@vger.kernel.org, linan666@huaweicloud.com, yukuai3@huawei.com, yi.zhang@huawei.com, houtao1@huawei.com, yangerkun@huawei.com Subject: [PATCH v6 2/9] md: changed the switch of RAID_VERSION to if Date: Tue, 6 Feb 2024 16:55:04 +0800 Message-Id: <20240206085511.2841555-3-linan666@huaweicloud.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240206085511.2841555-1-linan666@huaweicloud.com> References: <20240206085511.2841555-1-linan666@huaweicloud.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CM-TRANSID: cCh0CgCXaBEG9cFldA+QDA--.34552S6 X-Coremail-Antispam: 1UD129KBjvdXoW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VAFwI0_Gr0_ Gr1UYxBIdaVFxhVjvjDU0xZFpf9x0JUvAp5UUUUU= X-CM-SenderInfo: polqt0awwwqx5xdzvxpfor3voofrz/ X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790139502893270278 X-GMAIL-MSGID: 1790139502893270278 |
Series |
bugfix of MD_CLOSING and clean up md_ioctl()
|
|
Commit Message
Li Nan
Feb. 6, 2024, 8:55 a.m. UTC
From: Li Nan <linan122@huawei.com> There is only one case of this 'switch'. Change it to 'if'. Signed-off-by: Li Nan <linan122@huawei.com> --- drivers/md/md.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/drivers/md/md.c b/drivers/md/md.c index 1b509fb82040..ea147348bd24 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -7636,12 +7636,8 @@ static int md_ioctl(struct block_device *bdev, blk_mode_t mode, * Commands dealing with the RAID driver but not any * particular array: */ - switch (cmd) { - case RAID_VERSION: - err = get_version(argp); - goto out; - default:; - } + if (cmd == RAID_VERSION) + return get_version(argp); /* * Commands creating/starting a new array: