* [PATCH 1/3] block/partition-generic.c: Remove a set-but-not-used variable
2016-06-14 15:01 [PATCH 0/3] Three minor patches for kernel v4.8 Bart Van Assche
@ 2016-06-14 15:03 ` Bart Van Assche
2016-06-14 15:03 ` [PATCH 2/3] block/bio-integrity.c: Add #include "blk.h" Bart Van Assche
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2016-06-14 15:03 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org
A value is assigned to the variable 'info' but that value is never
used. Hence remove the variable 'info'.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
block/partition-generic.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/block/partition-generic.c b/block/partition-generic.c
index d7eb77e..71d9ed9 100644
--- a/block/partition-generic.c
+++ b/block/partition-generic.c
@@ -495,7 +495,6 @@ rescan:
/* add partitions */
for (p = 1; p < state->limit; p++) {
sector_t size, from;
- struct partition_meta_info *info = NULL;
size = state->parts[p].size;
if (!size)
@@ -530,8 +529,6 @@ rescan:
}
}
- if (state->parts[p].has_info)
- info = &state->parts[p].info;
part = add_partition(disk, p, from, size,
state->parts[p].flags,
&state->parts[p].info);
--
2.8.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* [PATCH 2/3] block/bio-integrity.c: Add #include "blk.h"
2016-06-14 15:01 [PATCH 0/3] Three minor patches for kernel v4.8 Bart Van Assche
2016-06-14 15:03 ` [PATCH 1/3] block/partition-generic.c: Remove a set-but-not-used variable Bart Van Assche
@ 2016-06-14 15:03 ` Bart Van Assche
2016-06-14 15:04 ` [PATCH 3/3] block/blk-cgroup.c: Declare local symbols static Bart Van Assche
2016-06-14 15:10 ` [PATCH 0/3] Three minor patches for kernel v4.8 Jens Axboe
3 siblings, 0 replies; 6+ messages in thread
From: Bart Van Assche @ 2016-06-14 15:03 UTC (permalink / raw)
To: Jens Axboe; +Cc: linux-block@vger.kernel.org
This patch avoids that building with W=1 C=2 triggers the following
warning:
block/bio-integrity.c:35:6: warning: symbol 'blk_flush_integrity' was not declared. Should it be static?
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
block/bio-integrity.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/block/bio-integrity.c b/block/bio-integrity.c
index 711e4d8d..15d37b1 100644
--- a/block/bio-integrity.c
+++ b/block/bio-integrity.c
@@ -26,6 +26,7 @@
#include <linux/bio.h>
#include <linux/workqueue.h>
#include <linux/slab.h>
+#include "blk.h"
#define BIP_INLINE_VECS 4
--
2.8.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH 3/3] block/blk-cgroup.c: Declare local symbols static
2016-06-14 15:01 [PATCH 0/3] Three minor patches for kernel v4.8 Bart Van Assche
2016-06-14 15:03 ` [PATCH 1/3] block/partition-generic.c: Remove a set-but-not-used variable Bart Van Assche
2016-06-14 15:03 ` [PATCH 2/3] block/bio-integrity.c: Add #include "blk.h" Bart Van Assche
@ 2016-06-14 15:04 ` Bart Van Assche
2016-06-15 18:19 ` Tejun Heo
2016-06-14 15:10 ` [PATCH 0/3] Three minor patches for kernel v4.8 Jens Axboe
3 siblings, 1 reply; 6+ messages in thread
From: Bart Van Assche @ 2016-06-14 15:04 UTC (permalink / raw)
To: Jens Axboe; +Cc: Tejun Heo, linux-block@vger.kernel.org
Detected by sparse.
Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Tejun Heo <tj@kernel.org>
---
block/blk-cgroup.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/block/blk-cgroup.c b/block/blk-cgroup.c
index 66e6f1a..dd38e5c 100644
--- a/block/blk-cgroup.c
+++ b/block/blk-cgroup.c
@@ -905,7 +905,7 @@ static int blkcg_print_stat(struct seq_file *sf, void *v)
return 0;
}
-struct cftype blkcg_files[] = {
+static struct cftype blkcg_files[] = {
{
.name = "stat",
.flags = CFTYPE_NOT_ON_ROOT,
@@ -914,7 +914,7 @@ struct cftype blkcg_files[] = {
{ } /* terminate */
};
-struct cftype blkcg_legacy_files[] = {
+static struct cftype blkcg_legacy_files[] = {
{
.name = "reset_stats",
.write_u64 = blkcg_reset_stats,
--
2.8.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH 0/3] Three minor patches for kernel v4.8
2016-06-14 15:01 [PATCH 0/3] Three minor patches for kernel v4.8 Bart Van Assche
` (2 preceding siblings ...)
2016-06-14 15:04 ` [PATCH 3/3] block/blk-cgroup.c: Declare local symbols static Bart Van Assche
@ 2016-06-14 15:10 ` Jens Axboe
3 siblings, 0 replies; 6+ messages in thread
From: Jens Axboe @ 2016-06-14 15:10 UTC (permalink / raw)
To: Bart Van Assche, Jens Axboe; +Cc: linux-block@vger.kernel.org
On 06/14/2016 09:01 AM, Bart Van Assche wrote:
> Hello Jens,
>
> The three patches in this series are what I came up with after having
> analyzed the output of building the block layer with make options W=1
> and C=2. It would be appreciated if you would consider these patches for
> inclusion in kernel v4.8. These three patches are:
>
> 0001-block-partition-generic.c-Remove-a-set-but-not-used-.patch
> 0002-block-bio-integrity.c-Add-include-blk.h.patch
> 0003-block-blk-cgroup.c-Declare-local-symbols-static.patch
Thanks Bart, looks nice'n simple. Added for 4.8.
--
Jens Axboe
^ permalink raw reply [flat|nested] 6+ messages in thread