All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 00/20] loop: cleanup and small improvement
@ 2021-02-02  5:35 Chaitanya Kulkarni
  2021-02-02  5:35 ` [RFC PATCH 01/20] loop: use uniform alignment for struct members Chaitanya Kulkarni
                   ` (19 more replies)
  0 siblings, 20 replies; 31+ messages in thread
From: Chaitanya Kulkarni @ 2021-02-02  5:35 UTC (permalink / raw)
  To: linux-block; +Cc: axboe, Chaitanya Kulkarni

Hi,

In the current loop driver, there are different coding style present
which creates confusion when adding new code e.g. variable declaration,
function parameter spacing, switch case break vs return, setting up
error code before the error condition when error code is not shared,
structure member alignment, inconsistent variable declaration style,
declaring the same variable in two switch cases, using extra variable
instead of direclty accessing structure member for one occurance in the
code etc. 

This patch-series tries to fix that and also adds some improvements such
as adding lockdep assert, reducing the memset count, using snprintf etc.

Marking it RFC since I'm sure if these little fixes are welcome or not
as code works fine without it. On confirmation I'll spend more time
building a patch-series with an an extensive test report.

Hopefully unlike my previous series this will not end up twice on the
mailing list.

-ck

Chaitanya Kulkarni (20):
  loop: use uniform alignment for struct members
  loop: add lockdep assert in loop_add()
  loop: add lockdep assert in loop_lookup()
  loop: allow user to set the queue depth
  loop: use snprintf for XXX_show()
  loop: add newline after variable declaration
  loop: use uniform variable declaration style
  loop: use uniform function header style
  loop: remove extra variable in lo_fallocate()
  loop: remove extra variable in lo_req_flush
  loop: remove local variable in lo_compat_ioctl
  loop: cleanup lo_ioctl()
  loop: remove memset in info64 to compat
  loop: remove memset in info64 from compat
  loop: remove memset in loop_info64_from_old()
  loop: remove memset in loop_info64_to_old()
  loop: change fd set err at actual error condition
  loop: configure set err at actual error condition
  loop: set error value in case of actual error
  loop: remove the extra line in declaration

 drivers/block/loop.c | 253 ++++++++++++++++++++-----------------------
 drivers/block/loop.h |  26 ++---
 2 files changed, 132 insertions(+), 147 deletions(-)

-- 
2.22.1


^ permalink raw reply	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2021-02-02 19:58 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-02  5:35 [RFC PATCH 00/20] loop: cleanup and small improvement Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 01/20] loop: use uniform alignment for struct members Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 02/20] loop: add lockdep assert in loop_add() Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 03/20] loop: add lockdep assert in loop_lookup() Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 04/20] loop: allow user to set the queue depth Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 05/20] loop: use snprintf for XXX_show() Chaitanya Kulkarni
2021-02-02 11:05   ` Johannes Thumshirn
2021-02-02 19:56     ` Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 06/20] loop: add newline after variable declaration Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 07/20] loop: use uniform variable declaration style Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 08/20] loop: use uniform function header style Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 09/20] loop: remove extra variable in lo_fallocate() Chaitanya Kulkarni
2021-02-02 11:50   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 10/20] loop: remove extra variable in lo_req_flush Chaitanya Kulkarni
2021-02-02 11:50   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 11/20] loop: remove local variable in lo_compat_ioctl Chaitanya Kulkarni
2021-02-02 11:52   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 12/20] loop: cleanup lo_ioctl() Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 13/20] loop: remove memset in info64 to compat Chaitanya Kulkarni
2021-02-02 11:55   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 14/20] loop: remove memset in info64 from compat Chaitanya Kulkarni
2021-02-02 11:55   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 15/20] loop: remove memset in loop_info64_from_old() Chaitanya Kulkarni
2021-02-02 11:58   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 16/20] loop: remove memset in loop_info64_to_old() Chaitanya Kulkarni
2021-02-02 11:59   ` Johannes Thumshirn
2021-02-02  5:35 ` [RFC PATCH 17/20] loop: change fd set err at actual error condition Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 18/20] loop: configure " Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 19/20] loop: set error value in case of actual error Chaitanya Kulkarni
2021-02-02  5:35 ` [RFC PATCH 20/20] loop: remove the extra line in declaration Chaitanya Kulkarni
2021-02-02 12:07   ` Johannes Thumshirn

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.