From patchwork Wed Jul 15 09:52:10 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664671 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6B0DF138C for ; Wed, 15 Jul 2020 09:52:39 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 20E952064B for ; Wed, 15 Jul 2020 09:52:38 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 20E952064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-440-se6cZ6EEO6iv93PvHzNpqw-1; Wed, 15 Jul 2020 05:52:34 -0400 X-MC-Unique: se6cZ6EEO6iv93PvHzNpqw-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D3E0B80BCAD; Wed, 15 Jul 2020 09:52:29 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B121E5D9C5; Wed, 15 Jul 2020 09:52:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 5D09B94EFE; Wed, 15 Jul 2020 09:52:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qQ1S007871 for ; Wed, 15 Jul 2020 05:52:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 77A5910EE834; Wed, 15 Jul 2020 09:52:26 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 7250710EE828 for ; Wed, 15 Jul 2020 09:52:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id D7961858EE4 for ; Wed, 15 Jul 2020 09:52:25 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-vDb29g4wPReVuxVXsJkclw-2; Wed, 15 Jul 2020 05:52:21 -0400 X-MC-Unique: vDb29g4wPReVuxVXsJkclw-2 IronPort-SDR: 0ZDC6YFGE92VW62tpTNMyLI9+jow2dhexZ4ab7TpzMvtTcdWIrY6Hhi1WfU5cJkwYy3vQbay6J HeVbcr06Ddn/za7dzV+qcLKkxZON0QVM+qH+YI96Kl4oYGHiKhgj3BZ4YVlFdrAQkUcphmD/9l v0SG7iAIgigff4Y7Ex5f+vJE7LhR3bW7ef1seZMxZciBGDikQ/+nV+p/+hLQcIj8N6NFeAYaEY 6vEmBuiVdvjXwF23OGNMzZM7szikqmIC8WVLeUhHX0IgZJTyVas+AE1v8bwkxysVn4y1MEJjDG gi0= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769660" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:19 +0800 IronPort-SDR: 0rpbHHittprl8h9OeI9fa5zZM5sHAtEk9sBIE3y/1qQScZjP9rrRKzVQ6zBg7c2VDx56G7+x3I Zd1FKgkwIwceixlxyxKkbwaIwUPYg9m8Y= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:12 -0700 IronPort-SDR: jZlY0uTvoA2vBg06Q51dzBkmS9dNZBseiXw66hY2LJ3tN+nQEqaaKUt+CqrgaG5DIWADcwCh0h 5l/HTvx6j8rA== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:18 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:10 +0900 Message-Id: <20200715095217.441885-2-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 1/8] dm raid5: Remove set but unused variable X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Remove the variable offset in r5c_tree_index() to avoid a "set but not used" compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal --- drivers/md/raid5-cache.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 9b6da759dca2..eea14fa9e59b 100644 --- a/drivers/md/raid5-cache.c +++ b/drivers/md/raid5-cache.c @@ -195,9 +195,7 @@ struct r5l_log { static inline sector_t r5c_tree_index(struct r5conf *conf, sector_t sect) { - sector_t offset; - - offset = sector_div(sect, conf->chunk_sectors); + sector_div(sect, conf->chunk_sectors); return sect; } From patchwork Wed Jul 15 09:52:11 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664675 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id CE6FE6C1 for ; Wed, 15 Jul 2020 09:52:41 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 829712064B for ; Wed, 15 Jul 2020 09:52:41 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 829712064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-352-dHKVSojROhm_NMR7TJLf_g-1; Wed, 15 Jul 2020 05:52:34 -0400 X-MC-Unique: dHKVSojROhm_NMR7TJLf_g-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 243BE1DEB; Wed, 15 Jul 2020 09:52:30 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D37355FC31; Wed, 15 Jul 2020 09:52:29 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9CDD194F06; Wed, 15 Jul 2020 09:52:28 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qQXP007872 for ; Wed, 15 Jul 2020 05:52:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id 76AB710EE833; Wed, 15 Jul 2020 09:52:26 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast05.extmail.prod.ext.rdu2.redhat.com [10.11.55.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 71A3A1007A43 for ; Wed, 15 Jul 2020 09:52:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 9361792490A for ; Wed, 15 Jul 2020 09:52:23 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-ackgQleTMeu5eyQLIfN6Wg-1; Wed, 15 Jul 2020 05:52:21 -0400 X-MC-Unique: ackgQleTMeu5eyQLIfN6Wg-1 IronPort-SDR: AXn7l+sLdf2oRA5sPJnXgaaMJaknuNWFVg1xTEqcuSL6PDhOiWkAf51ZRcghOMMrb/U2ZB3RSD EEuWJsanaOnVIWysA/Bqc4nqr2CUBaRCYbN5tlw5Jo9V5GRhpeT2yaEheVcnvPsvuwMlwXZkQS NViznAlj3aOMuAuqyUjlLHm8gR5O/q320h+xrT8ZifF1lAlZbXPQ7uCfw68a7vfMEDD/2isqnu PJ/TMuiJbd1D7L7cclg0wLSo9JE3TzB/HDY0FM3tI+CMClrluP0NbCWOCzzlOuw+d7LeAGJtkz 9BM= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769662" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:20 +0800 IronPort-SDR: MOD6S4L1im1AuV9EYCkz0KeRoJ2e5yVk4YFoCZGCfGd4j9ha0NDNwIgzTyihR6zM77W8jrLpcu B6/EVPkuz8pMYLEPv1egG6Cf6xbuqux+U= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:13 -0700 IronPort-SDR: 6UoT5rjrL2t5WEWqXCd9PlEcFsbSivMIt2mnDg5Pu0LWnM9KRYp5SlmO25u0mNeTzHni31gx9d S21mHuyyqm9A== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:19 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:11 +0900 Message-Id: <20200715095217.441885-3-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 2/8] dm raid5: Fix compilation warning X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Remove the if statement around the calls to sysfs_link_rdev() to avoid the compilation warning "suggest braces around empty body in an ‘if’ statement" when compiling with W=1. Also fix function description comments to avoid kdoc format warnings. Signed-off-by: Damien Le Moal --- drivers/md/raid5.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c index ab8067f9ce8c..5cd1dd44881c 100644 --- a/drivers/md/raid5.c +++ b/drivers/md/raid5.c @@ -2217,9 +2217,9 @@ static int grow_stripes(struct r5conf *conf, int num) /** * scribble_alloc - allocate percpu scribble buffer for required size * of the scribble region - * @percpu - from for_each_present_cpu() of the caller - * @num - total number of disks in the array - * @cnt - scribble objs count for required size of the scribble region + * @percpu: from for_each_present_cpu() of the caller + * @num: total number of disks in the array + * @cnt: scribble objs count for required size of the scribble region * * The scribble buffer size must be enough to contain: * 1/ a struct page pointer for each device in the array +2 @@ -3710,7 +3710,7 @@ static int fetch_block(struct stripe_head *sh, struct stripe_head_state *s, return 0; } -/** +/* * handle_stripe_fill - read or compute data to satisfy pending requests. */ static void handle_stripe_fill(struct stripe_head *sh, @@ -7944,8 +7944,8 @@ static int raid5_start_reshape(struct mddev *mddev) else rdev->recovery_offset = 0; - if (sysfs_link_rdev(mddev, rdev)) - /* Failure here is OK */; + /* Failure here is OK */ + sysfs_link_rdev(mddev, rdev); } } else if (rdev->raid_disk >= conf->previous_raid_disks && !test_bit(Faulty, &rdev->flags)) { From patchwork Wed Jul 15 09:52:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664683 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 691DD1510 for ; Wed, 15 Jul 2020 09:52:50 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1F8982064B for ; Wed, 15 Jul 2020 09:52:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1F8982064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-zuK8OWGsM7e_qvd9nZdLuQ-1; Wed, 15 Jul 2020 05:52:45 -0400 X-MC-Unique: zuK8OWGsM7e_qvd9nZdLuQ-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 6BB931083E83; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 4FC95100164C; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 24F9A1809563; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qQYb007875 for ; Wed, 15 Jul 2020 05:52:26 -0400 Received: by smtp.corp.redhat.com (Postfix) id BCC601007A4C; Wed, 15 Jul 2020 09:52:26 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id B82831008B99 for ; Wed, 15 Jul 2020 09:52:26 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A0331856A54 for ; Wed, 15 Jul 2020 09:52:26 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-4mThnn_WO1GiFvRF_ZXMkA-2; Wed, 15 Jul 2020 05:52:22 -0400 X-MC-Unique: 4mThnn_WO1GiFvRF_ZXMkA-2 IronPort-SDR: cqrEyjB2yRhHw4OoehUxZvlhvbPF5TtuUPG8vxbayZPET2CP5l8l+Nojh9kTHoI5SIwK5L9EC/ LI3WlbLQr2rrDC39T2vNq6Dl+ecEXHIGwFMCcrNf0o4I27GpMFy92GgdQglsCDzHeDH9opt2lY UmzX1lDvgBWYLoHKLA4PUmy2oljKyXa+/wMwNIC7HecKCEQUftkLi4Jnj2Igo3o5M0BRo12JNg DhS4ijs/jA4lU7JJ40p9y4JrcjAdDSKwi4wbhbPNPmg2icAKhA4Qk2jr8piUTvknStigfs7NVH 6XI= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769665" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:20 +0800 IronPort-SDR: y5QE9+t7yVSg7OT7ajQ9/jbM3rsxPoFoLAhvwn8x9GMdioQpS+H5Ubp224SbOXgrRgr9DS7rto YB0q0V2ZEoZjKM0wYO7QPhWl1NxRKhUzU= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:14 -0700 IronPort-SDR: 5RStOCRSiwttNm7b4JOwlxqTev1O/q7SxQjwZRjZw8DjbbW+76SmjiCSLzCsHwgMKpjN/z9Lev VHn5wSGoJexA== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:20 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:12 +0900 Message-Id: <20200715095217.441885-4-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 3/8] md: Fix compilation warning X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Remove the if statement around the calls to sysfs_link_rdev() to avoid the compilation warnings: warning: suggest braces around empty body in an ‘if’ statement when compiling with W=1. For the call to sysfs_create_link() generating the same warning, use the err variable to store the function result, avoiding triggering another warning as the function is declared as 'warn_unused_result'. Signed-off-by: Damien Le Moal --- drivers/md/md.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index f567f536b529..f6c83483a5a2 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -2441,8 +2441,8 @@ static int bind_rdev_to_array(struct md_rdev *rdev, struct mddev *mddev) goto fail; ko = &part_to_dev(rdev->bdev->bd_part)->kobj; - if (sysfs_create_link(&rdev->kobj, ko, "block")) - /* failure here is OK */; + /* failure here is OK */ + err = sysfs_create_link(&rdev->kobj, ko, "block"); rdev->sysfs_state = sysfs_get_dirent_safe(rdev->kobj.sd, "state"); list_add_rcu(&rdev->same_set, &mddev->disks); @@ -3202,8 +3202,8 @@ slot_store(struct md_rdev *rdev, const char *buf, size_t len) return err; } else sysfs_notify_dirent_safe(rdev->sysfs_state); - if (sysfs_link_rdev(rdev->mddev, rdev)) - /* failure here is OK */; + /* failure here is OK */; + sysfs_link_rdev(rdev->mddev, rdev); /* don't wakeup anyone, leave that to userspace. */ } else { if (slot >= rdev->mddev->raid_disks && @@ -9060,8 +9060,8 @@ static int remove_and_add_spares(struct mddev *mddev, rdev->recovery_offset = 0; } if (mddev->pers->hot_add_disk(mddev, rdev) == 0) { - if (sysfs_link_rdev(mddev, rdev)) - /* failure here is OK */; + /* failure here is OK */ + sysfs_link_rdev(mddev, rdev); if (!test_bit(Journal, &rdev->flags)) spares++; md_new_event(mddev); From patchwork Wed Jul 15 09:52:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664681 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D477D138C for ; Wed, 15 Jul 2020 09:52:49 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8A3F12064B for ; Wed, 15 Jul 2020 09:52:49 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8A3F12064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-68-A7JV5PHXO9iq2itJMuGF9g-1; Wed, 15 Jul 2020 05:52:46 -0400 X-MC-Unique: A7JV5PHXO9iq2itJMuGF9g-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5946C800EB6; Wed, 15 Jul 2020 09:52:42 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 3D4CF5D9C5; Wed, 15 Jul 2020 09:52:42 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 18B1F94F06; Wed, 15 Jul 2020 09:52:42 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qS1M007890 for ; Wed, 15 Jul 2020 05:52:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id 22A1386D90; Wed, 15 Jul 2020 09:52:28 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1E2D3F11C0 for ; Wed, 15 Jul 2020 09:52:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 149BC1832D24 for ; Wed, 15 Jul 2020 09:52:25 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-HsZRztcSOe2Tbbxps7S4QQ-3; Wed, 15 Jul 2020 05:52:22 -0400 X-MC-Unique: HsZRztcSOe2Tbbxps7S4QQ-3 IronPort-SDR: J6v+2bVyt5HqkRMY0hkMYwkgkZDv+pJkUnJY1eAPsgJkhfZsskjrfZyLkb+3QoT+LLUROlTHdm lfyEOqnKOo2VS/YNN1lsDW3moH/Wm0DTVLYwqfySy2P9Qh7V5Ts5IYdhzVDntcdGtRCGNQBxxh mwnko9Ney7DVYAOraqz3s6IUIBTv6rtSXxoPCYSTU06UvML+X+isNzPRHSobYy+RhOG8WGvHN5 EDtB2sa0UOt6YKPdu1gQJ9eh4owEEjxY6yg//8dfwTUceZ92nZq+55uX2UzNsoMN9+Jnowhpfo rkY= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769668" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:21 +0800 IronPort-SDR: sM79oto3r7Sb5VgwS9QP3rzMgY/WjdQ+2nn2yIojk0YODhp5iFgduk0VJWJl/s+pkmLmi6gkQR kPs5XuhZS7GKvNTicPZA4ni/p2StRsGDk= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:14 -0700 IronPort-SDR: DnWCT7o6qpbm13srqRRDFagzaXAtSw8A1HWhAphQq/KMQhD6F6GknAGrpZxWOFew82bP/AG0Mu P6B2ZWlvgJmQ== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:21 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:13 +0900 Message-Id: <20200715095217.441885-5-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 4/8] dm raid10: Fix compilation warning X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=dm-devel-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Remove the if statement around the call to sysfs_link_rdev() in raid10_start_reshape() to avoid the compilation warning: warning: suggest braces around empty body in an ‘if’ statement when compiling with W=1. Signed-off-by: Damien Le Moal --- drivers/md/raid10.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/raid10.c b/drivers/md/raid10.c index ec136e44aef7..08f697f3ddc8 100644 --- a/drivers/md/raid10.c +++ b/drivers/md/raid10.c @@ -4307,8 +4307,8 @@ static int raid10_start_reshape(struct mddev *mddev) else rdev->recovery_offset = 0; - if (sysfs_link_rdev(mddev, rdev)) - /* Failure here is OK */; + /* Failure here is OK */ + sysfs_link_rdev(mddev, rdev); } } else if (rdev->raid_disk >= conf->prev.raid_disks && !test_bit(Faulty, &rdev->flags)) { From patchwork Wed Jul 15 09:52:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664687 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id A5AF7138C for ; Wed, 15 Jul 2020 09:52:53 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5736D2064B for ; Wed, 15 Jul 2020 09:52:53 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5736D2064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-415-KHjwuRyvNWCsO4dy0Mukow-1; Wed, 15 Jul 2020 05:52:50 -0400 X-MC-Unique: KHjwuRyvNWCsO4dy0Mukow-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E36728027FA; Wed, 15 Jul 2020 09:52:45 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C571960BF4; Wed, 15 Jul 2020 09:52:45 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 9E66094F13; Wed, 15 Jul 2020 09:52:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qVGU007941 for ; Wed, 15 Jul 2020 05:52:31 -0400 Received: by smtp.corp.redhat.com (Postfix) id 07784F11CC; Wed, 15 Jul 2020 09:52:31 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast04.extmail.prod.ext.rdu2.redhat.com [10.11.55.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 024AA951CB for ; Wed, 15 Jul 2020 09:52:25 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 5092A1012448 for ; Wed, 15 Jul 2020 09:52:25 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-339-T_VgOGNaPeWJFSPNXHdGzA-1; Wed, 15 Jul 2020 05:52:23 -0400 X-MC-Unique: T_VgOGNaPeWJFSPNXHdGzA-1 IronPort-SDR: Xp6i7ar3asOcYOGg6ncopGMEfiDceNVTXrAUSBq7toSzvm68C6zHBBpf1BF36/Jnxi60NDq/LA fnGAZskEesvi6mIN62rNyVKsFuoPLR1IV+eyZcUic9CLmEIun0lpN1h4h3L+wIVWIRFz8eychd nyZimBYcKONhm3r9uLqk6l/ek4kLkChG8hcPTmOjKwzkcJVA5pTmInfKBrncXngSTvJQ0w08MC QiEi+gfIg61Qci/NyBiNsXvygtNAvlBHsNyx4w292mnAbvrBwi1pmLk4paGB4Nh+mKv8Vv3+gk zgU= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769670" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:22 +0800 IronPort-SDR: hjSbtrED9ZitlzQSEylXASflSDBHw0hwzVeq5PzvPnlH49BgPLm2Py+KLHmaj4v6gZs2dC+JVL /gYPbzhx9ABZ4efolIMFIDOxNlqSxwS2g= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:15 -0700 IronPort-SDR: F4c+xRYoCOr/QUrw56oAsg/MdAtbfe7HjbEaOKe8hbyzYNw9993t3m5Ku0u51AjNukA+/nASt8 IPnzg+uRVKeQ== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:22 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:14 +0900 Message-Id: <20200715095217.441885-6-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 5/8] dm verity: Fix compilation warning X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com For the case !CONFIG_DM_VERITY_VERIFY_ROOTHASH_SIG, declare the functions verity_verify_root_hash(), verity_verify_is_sig_opt_arg(), verity_verify_sig_parse_opt_args() and verity_verify_sig_opts_cleanup() as inline to avoid a "no previous prototype for xxx" compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal --- drivers/md/dm-verity-verify-sig.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/md/dm-verity-verify-sig.h b/drivers/md/dm-verity-verify-sig.h index 19b1547aa741..3987c7141f79 100644 --- a/drivers/md/dm-verity-verify-sig.h +++ b/drivers/md/dm-verity-verify-sig.h @@ -34,25 +34,25 @@ void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts); #define DM_VERITY_ROOT_HASH_VERIFICATION_OPTS 0 -int verity_verify_root_hash(const void *data, size_t data_len, - const void *sig_data, size_t sig_len) +static inline int verity_verify_root_hash(const void *data, size_t data_len, + const void *sig_data, size_t sig_len) { return 0; } -bool verity_verify_is_sig_opt_arg(const char *arg_name) +static inline bool verity_verify_is_sig_opt_arg(const char *arg_name) { return false; } -int verity_verify_sig_parse_opt_args(struct dm_arg_set *as, struct dm_verity *v, - struct dm_verity_sig_opts *sig_opts, - unsigned int *argc, const char *arg_name) +static inline int verity_verify_sig_parse_opt_args(struct dm_arg_set *as, + struct dm_verity *v, struct dm_verity_sig_opts *sig_opts, + unsigned int *argc, const char *arg_name) { return -EINVAL; } -void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts) +static inline void verity_verify_sig_opts_cleanup(struct dm_verity_sig_opts *sig_opts) { } From patchwork Wed Jul 15 09:52:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664679 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 61E11138C for ; Wed, 15 Jul 2020 09:52:48 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1798C206E9 for ; Wed, 15 Jul 2020 09:52:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1798C206E9 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-PPuvkbXYMDagQU1Eu7G5Sw-1; Wed, 15 Jul 2020 05:52:45 -0400 X-MC-Unique: PPuvkbXYMDagQU1Eu7G5Sw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 8BE9D8027EF; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 706C35FC34; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 478181809554; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qR4i007888 for ; Wed, 15 Jul 2020 05:52:28 -0400 Received: by smtp.corp.redhat.com (Postfix) id DDB3E1007A2B; Wed, 15 Jul 2020 09:52:27 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D996410073C3 for ; Wed, 15 Jul 2020 09:52:27 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BA0121832D23 for ; Wed, 15 Jul 2020 09:52:27 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-bCRaoIqiMRCoRPxCAB-_Mg-3; Wed, 15 Jul 2020 05:52:23 -0400 X-MC-Unique: bCRaoIqiMRCoRPxCAB-_Mg-3 IronPort-SDR: BMJg2yk9AFkgQH8qhVsyUp+cCYZr/fTX7C+EMTVWYeug4Nq3t2v/vD8zD2PkO8eSxqHlI8XthJ TOPawMR8ohEN077mF4qQMYHFABGHsmBnvLscQ+uvuOtR6gAoLTRVvwe8oeAH0NpFFgU7z7ZGRp HusthtktAK5bulxtPmdWLita81NWC9HGdxoK8YUK1vO4hcUw4AeiLlu7x/ghb0ws2dJqdAUaNV xTadzgIYhDTVLtIdRJ9I8HsCwjSSg74+4hi+htY0sw3uAiUOpy6m5/qBQviQoumMOEh1ZUi4n+ YYM= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769671" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:23 +0800 IronPort-SDR: biC0UcX0cSnnjWqpDHU+hmn5b/sGtiiNY/E7jAFq1RQEpaEzwsX6TNGWBocXArosoDf4MSqAVn mwbOkQMqw5sTR9uTzk2bOutz9M1qeYvek= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:16 -0700 IronPort-SDR: qP2Dk+PxsDIeRAS3CeQdsj6m6TSVf4uLTmNvkXhRf1N3sEfDbswU1UZjoN/lRsS42Je8KpfW/8 5IMTnVrIm3TQ== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:22 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:15 +0900 Message-Id: <20200715095217.441885-7-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 6/8] dm raid: Remove empty if statement X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com In super_init_validation(), remove a body-less if statement testing only variables to avoid a compilation warning when compiling with W=1. Signed-off-by: Damien Le Moal --- drivers/md/dm-raid.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/md/dm-raid.c b/drivers/md/dm-raid.c index 10e8b2fe787b..08023c50aaa0 100644 --- a/drivers/md/dm-raid.c +++ b/drivers/md/dm-raid.c @@ -2345,8 +2345,6 @@ static int super_init_validation(struct raid_set *rs, struct md_rdev *rdev) if (new_devs == rs->raid_disks || !rebuilds) { /* Replace a broken device */ - if (new_devs == 1 && !rs->delta_disks) - ; if (new_devs == rs->raid_disks) { DMINFO("Superblocks created for new raid set"); set_bit(MD_ARRAY_FIRST_USE, &mddev->flags); From patchwork Wed Jul 15 09:52:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664673 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 9C41D1510 for ; Wed, 15 Jul 2020 09:52:39 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 52B7A2064C for ; Wed, 15 Jul 2020 09:52:39 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 52B7A2064C Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-364-D6VsJmKFNZuTO_MR97WL-g-1; Wed, 15 Jul 2020 05:52:36 -0400 X-MC-Unique: D6VsJmKFNZuTO_MR97WL-g-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C980E800EB6; Wed, 15 Jul 2020 09:52:31 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id ABCAE19C4F; Wed, 15 Jul 2020 09:52:31 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 83BE7180954D; Wed, 15 Jul 2020 09:52:31 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qTTZ007910 for ; Wed, 15 Jul 2020 05:52:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 37E71215688E; Wed, 15 Jul 2020 09:52:29 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast06.extmail.prod.ext.rdu2.redhat.com [10.11.55.22]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 321932156A4D for ; Wed, 15 Jul 2020 09:52:29 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id EA7FC185A797 for ; Wed, 15 Jul 2020 09:52:28 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-31-VbhgQGY7OqGYJP-4Oc0sGw-4; Wed, 15 Jul 2020 05:52:24 -0400 X-MC-Unique: VbhgQGY7OqGYJP-4Oc0sGw-4 IronPort-SDR: 0Ur6ZNExi/dSKt/xJy5QxxKqGfCgW6o62N7DMBbdJrgALOarXlhXR9XWC9uvJdqZFsTKd+pV43 wpxADaeRCKCQr4Wa5m9WY/0puzBy7P2MenxWG/3gMQ3Qt5NbCz4oFtk20tYnCgQ7tpmy1YXdjB DSVP/rX4aMpDT1MaE4jPG9d/dT84doR0Q6ogyS/Q3IRC60IYSIcivVaW+O7pQcncYfYv/I/Snh mMOcmW2JXTpYtJnbfaJxfLMSfbkTmvHKW0nl1SeuWlz72jl9I6KfhVPkwrkRVMN5mfh3MLtQS4 U8M= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769674" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:24 +0800 IronPort-SDR: e3w/WQi5Frh9nZXKtLr7ZspomL5yeq7iDvJiOE/lkSsUOx4CmKmh6R0k5/P3+7mafMMra+HJMh rXgWh2g4rUALcBodoE2fbDcq+rnNdt+kk= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:17 -0700 IronPort-SDR: LxE990Ie3FlcgV7fqCnmSy/VdkIeSQ7P9yzSMahf8szQTUEqJkb4NfuCyyuSQ5obVNemmyRQ2n Yuqb+Hcq5Ljw== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:23 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:16 +0900 Message-Id: <20200715095217.441885-8-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 7/8] dm ioctl: Fix compilation warning X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com In retrieve_status(), when copying the target type name in the target_type string field of struct dm_target_spec, copy at most DM_MAX_TYPE_NAME - 1 character to avoid the compilation warning: warning: ‘__builtin_strncpy’ specified bound 16 equals destination size [-Wstringop-truncation] when compiling with W-1. Signed-off-by: Damien Le Moal --- drivers/md/dm-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 489935d5f22d..5792878dbff6 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c @@ -1168,7 +1168,7 @@ static void retrieve_status(struct dm_table *table, spec->sector_start = ti->begin; spec->length = ti->len; strncpy(spec->target_type, ti->type->name, - sizeof(spec->target_type)); + sizeof(spec->target_type) - 1); outptr += sizeof(struct dm_target_spec); remaining = len - (outptr - outbuf); From patchwork Wed Jul 15 09:52:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Le Moal X-Patchwork-Id: 11664677 X-Patchwork-Delegate: snitzer@redhat.com Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B0BD6C1 for ; Wed, 15 Jul 2020 09:52:48 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 013162064B for ; Wed, 15 Jul 2020 09:52:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 013162064B Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-280-opL8FOFLM0CwYTMzQtd_Fg-1; Wed, 15 Jul 2020 05:52:44 -0400 X-MC-Unique: opL8FOFLM0CwYTMzQtd_Fg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4272D100AA25; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 24C5F2DE6A; Wed, 15 Jul 2020 09:52:40 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id EFD6E1809557; Wed, 15 Jul 2020 09:52:39 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 06F9qTOG007911 for ; Wed, 15 Jul 2020 05:52:29 -0400 Received: by smtp.corp.redhat.com (Postfix) id 37C9F2156880; Wed, 15 Jul 2020 09:52:29 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from mimecast-mx02.redhat.com (mimecast01.extmail.prod.ext.rdu2.redhat.com [10.11.55.17]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 31E6D2156A3B for ; Wed, 15 Jul 2020 09:52:28 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 49F67858EE4 for ; Wed, 15 Jul 2020 09:52:28 +0000 (UTC) Received: from esa1.hgst.iphmx.com (esa1.hgst.iphmx.com [68.232.141.245]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-29-O4qf5QBtPl2DyeEnNesMNg-1; Wed, 15 Jul 2020 05:52:25 -0400 X-MC-Unique: O4qf5QBtPl2DyeEnNesMNg-1 IronPort-SDR: aORw0zR6oHTs9IFAcBtWZhXwrWX3Nz6HeA3Wf6y4ZKG0pYCl8TTmT1uFj0T4IQB4EJWdda1dwM J9on3LjLqByTVqv5ditA6VKCildhJYgQ8gmpItLz7JPwH0UFJfuN/kNUbLeU9kiVhdLV7nGo86 uiL+xDvtoTIrmnx8prD8JvNnFwrpyNkNOJj5gGm6qXI8QIX7BkyhNhDmfrVXzE4FkDKnoYTyCM Z0X3382gH82Go9VxzQrs6OmNo0F5MPK4uX4l1F5vJhgmyBLiQ+6D2Q/RYD33XoFp0RYBTCNpfu 9Jw= X-IronPort-AV: E=Sophos;i="5.75,354,1589212800"; d="scan'208";a="251769676" Received: from uls-op-cesaip02.wdc.com (HELO uls-op-cesaep02.wdc.com) ([199.255.45.15]) by ob1.hgst.iphmx.com with ESMTP; 15 Jul 2020 17:52:24 +0800 IronPort-SDR: /a0UCTq7UhoLlgwtLpBYrCSpQscW+FxUwlw0FFTNhovCxgPv+051BDWlSPV971w5UoSjDSlfr2 l5BQ+Wqvz3mixfH67FJUCJ1Z1drUB1n7s= Received: from uls-op-cesaip01.wdc.com ([10.248.3.36]) by uls-op-cesaep02.wdc.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Jul 2020 02:40:18 -0700 IronPort-SDR: CAsc+zHHqt+MxpFqyNP4/YtzZuKrUF7Ud2oqBvSxqsbKv5+94mXzv8VQlUuXNZlWBQ0Iu+rJnn ajw8t9b65dnw== WDCIronportException: Internal Received: from washi.fujisawa.hgst.com ([10.149.53.254]) by uls-op-cesaip01.wdc.com with ESMTP; 15 Jul 2020 02:52:24 -0700 From: Damien Le Moal To: dm-devel@redhat.com, Mike Snitzer Date: Wed, 15 Jul 2020 18:52:17 +0900 Message-Id: <20200715095217.441885-9-damien.lemoal@wdc.com> In-Reply-To: <20200715095217.441885-1-damien.lemoal@wdc.com> References: <20200715095217.441885-1-damien.lemoal@wdc.com> MIME-Version: 1.0 X-Mimecast-Spam-Signature: yes X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-loop: dm-devel@redhat.com Cc: Damien Le Moal Subject: [dm-devel] [PATCH 8/8] dm init: Set file local variable static X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Declare dm_allowed_targets as static to avoid the warning: drivers/md/dm-init.c:39:12: warning: symbol 'dm_allowed_targets' was not declared. Should it be static? when compiling with C=1. Signed-off-by: Damien Le Moal --- drivers/md/dm-init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/dm-init.c b/drivers/md/dm-init.c index b869316d3722..b0c45c6ebe0b 100644 --- a/drivers/md/dm-init.c +++ b/drivers/md/dm-init.c @@ -36,7 +36,7 @@ struct dm_device { struct list_head list; }; -const char * const dm_allowed_targets[] __initconst = { +static const char * const dm_allowed_targets[] __initconst = { "crypt", "delay", "linear",