diff mbox series

[7/9] n64: cosmetics changes

Message ID 20210125233243.5982-8-chaitanya.kulkarni@wdc.com (mailing list archive)
State New, archived
Headers show
Series n64: small cleanups | expand

Commit Message

Chaitanya Kulkarni Jan. 25, 2021, 11:32 p.m. UTC
Make the variable declaration ascending order and initialize the
variables at the time of declaration when possible.

Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Reviewed-by: Lauri Kasanen <cand@gmx.com>
---
 drivers/block/n64cart.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

Comments

Sergei Shtylyov Jan. 26, 2021, 8:53 a.m. UTC | #1
Hello!

On 26.01.2021 2:32, Chaitanya Kulkarni wrote:

> Make the variable declaration ascending order and initialize the

    Usually the vars are declared in descending order, no?

> variables at the time of declaration when possible.
> 
> Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
> Reviewed-by: Lauri Kasanen <cand@gmx.com>
[...]

MBR, Sergei
diff mbox series

Patch

diff --git a/drivers/block/n64cart.c b/drivers/block/n64cart.c
index 7906b5b2f12e..3bfb010402e3 100644
--- a/drivers/block/n64cart.c
+++ b/drivers/block/n64cart.c
@@ -88,10 +88,8 @@  static bool n64cart_do_bvec(struct device *dev, struct bio_vec *bv, u32 pos)
 static blk_qc_t n64cart_submit_bio(struct bio *bio)
 {
 	struct bio_vec bvec;
-	u32 pos;
 	struct bvec_iter iter;
-
-	pos = bio->bi_iter.bi_sector << SECTOR_SHIFT;
+	u32 pos = bio->bi_iter.bi_sector << SECTOR_SHIFT;
 
 	bio_for_each_segment(bvec, bio, iter) {
 		if (!n64cart_do_bvec(dev, &bvec, pos))
@@ -119,8 +117,8 @@  static const struct block_device_operations n64cart_fops = {
 static int __init n64cart_probe(struct platform_device *pdev)
 {
 	int err;
-	struct request_queue *queue;
 	struct gendisk *disk;
+	struct request_queue *queue;
 
 	if (!start || !size) {
 		pr_err("start or size not specified\n");