All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Jens Axboe <axboe@kernel.dk>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	linux-block@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [PATCH v1 5/9] pktcdvd: Drop redundant castings for sector_t
Date: Fri, 20 Jan 2023 00:08:05 +0200	[thread overview]
Message-ID: <20230119220809.5518-5-andriy.shevchenko@linux.intel.com> (raw)
In-Reply-To: <20230119220809.5518-1-andriy.shevchenko@linux.intel.com>

Since the commit 72deb455b5ec ("block: remove CONFIG_LBDAF")
the sector_t is always 64-bit type, no need to cast anymore.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/block/pktcdvd.c | 26 ++++++++++----------------
 1 file changed, 10 insertions(+), 16 deletions(-)

diff --git a/drivers/block/pktcdvd.c b/drivers/block/pktcdvd.c
index 96db6e348e1e..a53d21dbf2ab 100644
--- a/drivers/block/pktcdvd.c
+++ b/drivers/block/pktcdvd.c
@@ -493,7 +493,7 @@ static int pkt_seq_show(struct seq_file *m, void *p)
 	seq_printf(m, "\nQueue state:\n");
 	seq_printf(m, "\tbios queued:\t\t%d\n", pd->bio_queue_size);
 	seq_printf(m, "\tbios pending:\t\t%d\n", atomic_read(&pd->cdrw.pending_bios));
-	seq_printf(m, "\tcurrent sector:\t\t0x%llx\n", (unsigned long long)pd->current_sector);
+	seq_printf(m, "\tcurrent sector:\t\t0x%llx\n", pd->current_sector);
 
 	pkt_count_states(pd, states);
 	seq_printf(m, "\tstate:\t\t\ti:%d ow:%d rw:%d ww:%d rec:%d fin:%d\n",
@@ -1003,8 +1003,7 @@ static void pkt_end_io_read(struct bio *bio)
 	BUG_ON(!pd);
 
 	dev_dbg(disk_to_dev(pd->disk), "bio=%p sec0=%llx sec=%llx err=%d\n",
-		bio, (unsigned long long)pkt->sector,
-		(unsigned long long)bio->bi_iter.bi_sector, bio->bi_status);
+		bio, pkt->sector, bio->bi_iter.bi_sector, bio->bi_status);
 
 	if (bio->bi_status)
 		atomic_inc(&pkt->io_errors);
@@ -1067,7 +1066,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
 	spin_unlock(&pkt->lock);
 
 	if (pkt->cache_valid) {
-		dev_dbg(ddev, "zone %llx cached\n", (unsigned long long)pkt->sector);
+		dev_dbg(ddev, "zone %llx cached\n", pkt->sector);
 		goto out_account;
 	}
 
@@ -1099,8 +1098,7 @@ static void pkt_gather_data(struct pktcdvd_device *pd, struct packet_data *pkt)
 	}
 
 out_account:
-	dev_dbg(ddev, "need %d frames for zone %llx\n", frames_read,
-		(unsigned long long)pkt->sector);
+	dev_dbg(ddev, "need %d frames for zone %llx\n", frames_read, pkt->sector);
 	pd->stats.pkt_started++;
 	pd->stats.secs_rg += frames_read * (CD_FRAMESIZE >> 9);
 }
@@ -1143,8 +1141,7 @@ static inline void pkt_set_state(struct device *ddev, struct packet_data *pkt,
 	enum packet_data_state old_state = pkt->state;
 
 	dev_dbg(ddev, "pkt %2d : s=%6llx %s -> %s\n",
-		pkt->id, (unsigned long long)pkt->sector,
-		state_name[old_state], state_name[state]);
+		pkt->id, pkt->sector, state_name[old_state], state_name[state]);
 
 	pkt->state = state;
 }
@@ -1218,12 +1215,12 @@ static int pkt_handle_queue(struct pktcdvd_device *pd)
 	 * to this packet.
 	 */
 	spin_lock(&pd->lock);
-	dev_dbg(ddev, "looking for zone %llx\n", (unsigned long long)zone);
+	dev_dbg(ddev, "looking for zone %llx\n", zone);
 	while ((node = pkt_rbtree_find(pd, zone)) != NULL) {
 		sector_t tmp = get_zone(node->bio->bi_iter.bi_sector, pd);
 
 		bio = node->bio;
-		dev_dbg(ddev, "found zone=%llx\n", (unsigned long long)tmp);
+		dev_dbg(ddev, "found zone=%llx\n", tmp);
 		if (tmp != zone)
 			break;
 		pkt_rbtree_erase(pd, node);
@@ -1323,8 +1320,7 @@ static void pkt_start_write(struct pktcdvd_device *pd, struct packet_data *pkt)
 	pkt_set_state(ddev, pkt, PACKET_WRITE_WAIT_STATE);
 	spin_unlock(&pkt->lock);
 
-	dev_dbg(ddev, "Writing %d frames for zone %llx\n", pkt->write_size,
-		(unsigned long long)pkt->sector);
+	dev_dbg(ddev, "Writing %d frames for zone %llx\n", pkt->write_size, pkt->sector);
 
 	if (test_bit(PACKET_MERGE_SEGS, &pd->flags) || (pkt->write_size < pkt->frames))
 		pkt->cache_valid = 1;
@@ -2472,8 +2468,7 @@ static void pkt_submit_bio(struct bio *bio)
 		return;
 
 	dev_dbg(ddev, "start = %6llx stop = %6llx\n",
-		(unsigned long long)bio->bi_iter.bi_sector,
-		(unsigned long long)bio_end_sector(bio));
+		bio->bi_iter.bi_sector, bio_end_sector(bio));
 
 	/*
 	 * Clone READ bios so we can have our own bi_end_io callback.
@@ -2484,8 +2479,7 @@ static void pkt_submit_bio(struct bio *bio)
 	}
 
 	if (!test_bit(PACKET_WRITABLE, &pd->flags)) {
-		dev_notice(ddev, "WRITE for ro device (%llu)\n",
-			   (unsigned long long)bio->bi_iter.bi_sector);
+		dev_notice(ddev, "WRITE for ro device (%llu)\n", bio->bi_iter.bi_sector);
 		goto end_io;
 	}
 
-- 
2.39.0


  parent reply	other threads:[~2023-01-19 22:23 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-01-19 22:08 [PATCH v1 1/9] pktcdvd: Get rid of custom printing macros Andy Shevchenko
2023-01-19 22:08 ` [PATCH v1 2/9] pktcdvd: replace sscanf() by kstrtoul() Andy Shevchenko
2023-01-19 22:40   ` David Laight
2023-01-20 11:47     ` 'Andy Shevchenko'
2023-01-19 22:08 ` [PATCH v1 3/9] pktcdvd: use sysfs_emit() to instead of scnprintf() Andy Shevchenko
2023-01-20  7:27   ` Greg Kroah-Hartman
2023-01-19 22:08 ` [PATCH v1 4/9] pktcdvd: Get rid of pkt_seq_show() forward declaration Andy Shevchenko
2023-01-20  7:27   ` Greg Kroah-Hartman
2023-01-19 22:08 ` Andy Shevchenko [this message]
2023-01-20  7:28   ` [PATCH v1 5/9] pktcdvd: Drop redundant castings for sector_t Greg Kroah-Hartman
2023-01-19 22:08 ` [PATCH v1 6/9] pktcdvd: Use DEFINE_SHOW_ATTRIBUTE() to simplify code Andy Shevchenko
2023-01-20  7:26   ` Greg Kroah-Hartman
2023-01-19 22:08 ` [PATCH v1 7/9] pktcdvd: Use put_unaligned_be16() and get_unaligned_be16() Andy Shevchenko
2023-01-19 22:08 ` [PATCH v1 8/9] pktcdvd: Get rid of redundant 'else' Andy Shevchenko
2023-01-20  7:26   ` Greg Kroah-Hartman
2023-01-19 22:08 ` [PATCH v1 9/9] pktcdvd: Sort headers Andy Shevchenko
2023-01-20  7:28   ` Greg Kroah-Hartman
2023-01-20  7:24 ` [PATCH v1 1/9] pktcdvd: Get rid of custom printing macros Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230119220809.5518-5-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=axboe@kernel.dk \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-block@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.