Linux-Next Archive on lore.kernel.org
 help / color / Atom feed
* [PATCH] gdrom: fix compilation error
@ 2021-04-11 22:43 Chaitanya Kulkarni
  2021-04-12  1:12 ` Bart Van Assche
  0 siblings, 1 reply; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-11 22:43 UTC (permalink / raw)
  To: linux-next, linux-kernel, lkft-triage, linux-block
  Cc: hch, axboe, Johannes.Thumshirn, hare, Damien.LeMoal,
	naresh.kamboju, Chaitanya Kulkarni

Use the right name for the struct request variable that removes the
following compilation error :-

make --silent --keep-going --jobs=8
O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=sh
CROSS_COMPILE=sh4-linux-gnu- 'CC=sccache sh4-linux-gnu-gcc'
'HOSTCC=sccache gcc'

In file included from /builds/linux/include/linux/scatterlist.h:9,
                 from /builds/linux/include/linux/dma-mapping.h:10,
                 from /builds/linux/drivers/cdrom/gdrom.c:16:
/builds/linux/drivers/cdrom/gdrom.c: In function 'gdrom_readdisk_dma':
/builds/linux/drivers/cdrom/gdrom.c:586:61: error: 'rq' undeclared
(first use in this function)
  586 |  __raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio),
      |                                                             ^~

Reported-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Tested-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Signed-off-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
---
 drivers/cdrom/gdrom.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c
index e7717d090868..742b4a0932e3 100644
--- a/drivers/cdrom/gdrom.c
+++ b/drivers/cdrom/gdrom.c
@@ -583,7 +583,7 @@ static blk_status_t gdrom_readdisk_dma(struct request *req)
 	read_command->cmd[1] = 0x20;
 	block = blk_rq_pos(req)/GD_TO_BLK + GD_SESSION_OFFSET;
 	block_cnt = blk_rq_sectors(req)/GD_TO_BLK;
-	__raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio),
+	__raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(req->bio),
 			GDROM_DMA_STARTADDR_REG);
 	__raw_writel(block_cnt * GDROM_HARD_SECTOR, GDROM_DMA_LENGTH_REG);
 	__raw_writel(1, GDROM_DMA_DIRECTION_REG);
-- 
2.22.1


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

* Re: [PATCH] gdrom: fix compilation error
  2021-04-11 22:43 [PATCH] gdrom: fix compilation error Chaitanya Kulkarni
@ 2021-04-12  1:12 ` Bart Van Assche
  2021-04-12  1:32   ` Jens Axboe
  0 siblings, 1 reply; 4+ messages in thread
From: Bart Van Assche @ 2021-04-12  1:12 UTC (permalink / raw)
  To: Chaitanya Kulkarni, linux-next, linux-kernel, lkft-triage, linux-block
  Cc: hch, axboe, Johannes.Thumshirn, hare, Damien.LeMoal, naresh.kamboju

On 4/11/21 3:43 PM, Chaitanya Kulkarni wrote:
> Use the right name for the struct request variable that removes the
> following compilation error :-
> 
> make --silent --keep-going --jobs=8
> O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=sh
> CROSS_COMPILE=sh4-linux-gnu- 'CC=sccache sh4-linux-gnu-gcc'
> 'HOSTCC=sccache gcc'
> 
> In file included from /builds/linux/include/linux/scatterlist.h:9,
>                  from /builds/linux/include/linux/dma-mapping.h:10,
>                  from /builds/linux/drivers/cdrom/gdrom.c:16:
> /builds/linux/drivers/cdrom/gdrom.c: In function 'gdrom_readdisk_dma':
> /builds/linux/drivers/cdrom/gdrom.c:586:61: error: 'rq' undeclared
> (first use in this function)
>   586 |  __raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio),
>       |                                                             ^~

How about adding a Fixes: tag?

Thanks,

Bart.

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

* Re: [PATCH] gdrom: fix compilation error
  2021-04-12  1:12 ` Bart Van Assche
@ 2021-04-12  1:32   ` Jens Axboe
  2021-04-12 18:13     ` Chaitanya Kulkarni
  0 siblings, 1 reply; 4+ messages in thread
From: Jens Axboe @ 2021-04-12  1:32 UTC (permalink / raw)
  To: Bart Van Assche, Chaitanya Kulkarni, linux-next, linux-kernel,
	lkft-triage, linux-block
  Cc: hch, Johannes.Thumshirn, hare, Damien.LeMoal, naresh.kamboju

On 4/11/21 7:12 PM, Bart Van Assche wrote:
> On 4/11/21 3:43 PM, Chaitanya Kulkarni wrote:
>> Use the right name for the struct request variable that removes the
>> following compilation error :-
>>
>> make --silent --keep-going --jobs=8
>> O=/home/tuxbuild/.cache/tuxmake/builds/1/tmp ARCH=sh
>> CROSS_COMPILE=sh4-linux-gnu- 'CC=sccache sh4-linux-gnu-gcc'
>> 'HOSTCC=sccache gcc'
>>
>> In file included from /builds/linux/include/linux/scatterlist.h:9,
>>                  from /builds/linux/include/linux/dma-mapping.h:10,
>>                  from /builds/linux/drivers/cdrom/gdrom.c:16:
>> /builds/linux/drivers/cdrom/gdrom.c: In function 'gdrom_readdisk_dma':
>> /builds/linux/drivers/cdrom/gdrom.c:586:61: error: 'rq' undeclared
>> (first use in this function)
>>   586 |  __raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio),
>>       |                                                             ^~
> 
> How about adding a Fixes: tag?

Indeed, that's definitely missing. I've added it and applied it.

-- 
Jens Axboe


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

* Re: [PATCH] gdrom: fix compilation error
  2021-04-12  1:32   ` Jens Axboe
@ 2021-04-12 18:13     ` Chaitanya Kulkarni
  0 siblings, 0 replies; 4+ messages in thread
From: Chaitanya Kulkarni @ 2021-04-12 18:13 UTC (permalink / raw)
  To: Jens Axboe, Bart Van Assche, linux-next, linux-kernel,
	lkft-triage, linux-block
  Cc: hch, Johannes Thumshirn, hare, Damien Le Moal, naresh.kamboju

On 4/11/21 18:33, Jens Axboe wrote:
>>>   586 |  __raw_writel(page_to_phys(bio_page(req->bio)) + bio_offset(rq->bio),
>>>       |                                                             ^~
>> How about adding a Fixes: tag?
> Indeed, that's definitely missing. I've added it and applied it.
>
> -- 

Sorry about that, thanks for fixing it.



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

end of thread, back to index

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-11 22:43 [PATCH] gdrom: fix compilation error Chaitanya Kulkarni
2021-04-12  1:12 ` Bart Van Assche
2021-04-12  1:32   ` Jens Axboe
2021-04-12 18:13     ` Chaitanya Kulkarni

Linux-Next Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-next/0 linux-next/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-next linux-next/ https://lore.kernel.org/linux-next \
		linux-next@vger.kernel.org
	public-inbox-index linux-next

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-next


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git