Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1290001 > unrolled thread
| Started by | Valdis Kletnieks <Valdis.Kletnieks@vt.edu> |
|---|---|
| First post | 2015-12-12 00:10 +0100 |
| Last post | 2015-12-22 00:50 +0100 |
| Articles | 4 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v2 0/6] Patch series to make lustre safe(r) for W=1 compiles Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-12 00:10 +0100
[PATCH v2 3/6] Clean up another C warnining: set but not used Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-12 00:10 +0100
[PATCH v2 2/6] Fix set-but-unused whinge. Valdis Kletnieks <Valdis.Kletnieks@vt.edu> - 2015-12-12 00:10 +0100
Re: [PATCH v2 0/6] Patch series to make lustre safe(r) for W=1 compiles Greg KH <gregkh@linuxfoundation.org> - 2015-12-22 00:50 +0100
| From | Valdis Kletnieks <Valdis.Kletnieks@vt.edu> |
|---|---|
| Date | 2015-12-12 00:10 +0100 |
| Subject | [PATCH v2 0/6] Patch series to make lustre safe(r) for W=1 compiles |
| Message-ID | <qEEZ4-2vR-17@gated-at.bofh.it> |
Start of a batch series to clean up the Lustre tree. Other people have done some sparse and checkpatch cleanups, but I found a bunch of stuff building with W=1. There's probably more, but this was the really low-hanging obvious fruit. Valdis Kletnieks (6): staging/lustre: Silence warning about 'inline' staging/lustre: Fix set-but-unused whinge. staging/lustre: Clean up another C warnining: set but not used staging/lustre: Fix another C compiler whine: set but not used staging/lustre: Nuke an unsigned >= 0 assert staging/lustre: Nuke another unsigned >= 0 assert drivers/staging/lustre/lustre/fid/lproc_fid.c | 1 + drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/include/lustre_cfg.h | 4 -- drivers/staging/lustre/lustre/libcfs/module.c | 15 ++++---- drivers/staging/lustre/lustre/llite/rw.c | 1 - drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 1 - 6 files changed, 9 insertions(+), 15 deletions(-) -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Valdis Kletnieks <Valdis.Kletnieks@vt.edu> |
|---|---|
| Date | 2015-12-12 00:10 +0100 |
| Subject | [PATCH v2 3/6] Clean up another C warnining: set but not used |
| Message-ID | <qEEZ5-2vR-39@gated-at.bofh.it> |
| In reply to | #1290001 |
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h: In function 'lustre_cfg_free':
drivers/staging/lustre/lustre/fid/../include/lustre_cfg.h:253:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
int len;
Yep, we're just gonna call kfree, no need to calculate len. Bye-bye.
Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
---
drivers/staging/lustre/lustre/include/lustre_cfg.h | 4 --
1 file changed, 4 deletions(-)
diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h
index eb6b292b7b25..d30d8b054c92 100644
--- a/drivers/staging/lustre/lustre/include/lustre_cfg.h
+++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h
@@ -252,10 +252,6 @@ static inline struct lustre_cfg *lustre_cfg_new(int cmd,
static inline void lustre_cfg_free(struct lustre_cfg *lcfg)
{
- int len;
-
- len = lustre_cfg_len(lcfg->lcfg_bufcount, lcfg->lcfg_buflens);
-
kfree(lcfg);
return;
}
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Valdis Kletnieks <Valdis.Kletnieks@vt.edu> |
|---|---|
| Date | 2015-12-12 00:10 +0100 |
| Subject | [PATCH v2 2/6] Fix set-but-unused whinge. |
| Message-ID | <qEEZ5-2vR-41@gated-at.bofh.it> |
| In reply to | #1290001 |
drivers/staging/lustre/lustre/fid/lproc_fid.c: In function 'ldebugfs_fid_write_common': drivers/staging/lustre/lustre/fid/lproc_fid.c:67:6: warning: variable 'rc' set but not used [-Wunused-but-set-variable] int rc; We fix it by *using* the return code to help bulletproof it. It says it's test code - it should be *more* bulletproof than production, not less. Signed-off-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu> --- drivers/staging/lustre/lustre/fid/lproc_fid.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index ce90c1c54a63..eff011f30fa5 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -85,6 +85,8 @@ ldebugfs_fid_write_common(const char __user *buffer, size_t count, rc = sscanf(kernbuf, "[%llx - %llx]\n", (unsigned long long *)&tmp.lsr_start, (unsigned long long *)&tmp.lsr_end); + if (rc != 2) + return -EINVAL; if (!range_is_sane(&tmp) || range_is_zero(&tmp) || tmp.lsr_start < range->lsr_start || tmp.lsr_end > range->lsr_end) return -EINVAL; -- 2.6.3 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Greg KH <gregkh@linuxfoundation.org> |
|---|---|
| Date | 2015-12-22 00:50 +0100 |
| Subject | Re: [PATCH v2 0/6] Patch series to make lustre safe(r) for W=1 compiles |
| Message-ID | <qIing-4Eb-19@gated-at.bofh.it> |
| In reply to | #1290001 |
On Fri, Dec 11, 2015 at 06:04:19PM -0500, Valdis Kletnieks wrote: > Start of a batch series to clean up the Lustre tree. Other people have > done some sparse and checkpatch cleanups, but I found a bunch of > stuff building with W=1. There's probably more, but this was the > really low-hanging obvious fruit. > > Valdis Kletnieks (6): > staging/lustre: Silence warning about 'inline' > staging/lustre: Fix set-but-unused whinge. > staging/lustre: Clean up another C warnining: set but not used > staging/lustre: Fix another C compiler whine: set but not used > staging/lustre: Nuke an unsigned >= 0 assert > staging/lustre: Nuke another unsigned >= 0 assert These subject names don't match what you actually sent out, the 'prefix' got stripped. Please resend them all so that I can properly apply them. thanks, greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web