diff mbox series

paride: fix up build warning on mips platforms

Message ID 20211130084626.3215987-1-gregkh@linuxfoundation.org (mailing list archive)
State New, archived
Headers show
Series paride: fix up build warning on mips platforms | expand

Commit Message

Greg Kroah-Hartman Nov. 30, 2021, 8:46 a.m. UTC
MIPS include files define "PC" so when building the paride driver the
following build warning shows up:

	rivers/block/paride/bpck.c:32: warning: "PC" redefined

Fix this by undefining PC before redefining it as is done for other
defines in this driver.

Cc: Tim Waugh <tim@cyberelk.net>
Cc: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/block/paride/bpck.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Greg Kroah-Hartman Dec. 20, 2021, 4:01 p.m. UTC | #1
On Tue, Nov 30, 2021 at 09:46:26AM +0100, Greg Kroah-Hartman wrote:
> MIPS include files define "PC" so when building the paride driver the
> following build warning shows up:
> 
> 	rivers/block/paride/bpck.c:32: warning: "PC" redefined
> 
> Fix this by undefining PC before redefining it as is done for other
> defines in this driver.
> 
> Cc: Tim Waugh <tim@cyberelk.net>
> Cc: Jens Axboe <axboe@kernel.dk>
> Cc: linux-block@vger.kernel.org
> Cc: linux-kernel@vger.kernel.org
> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
>  drivers/block/paride/bpck.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/block/paride/bpck.c b/drivers/block/paride/bpck.c
> index f5f63ca2889d..d880a9465e9b 100644
> --- a/drivers/block/paride/bpck.c
> +++ b/drivers/block/paride/bpck.c
> @@ -28,6 +28,7 @@
>  
>  #undef r2
>  #undef w2
> +#undef PC
>  
>  #define PC			pi->private
>  #define r2()			(PC=(in_p(2) & 0xff))
> -- 
> 2.34.1
> 

Given the lack of objections to this, I'll just take it through one of
my trees for 5.17-rc1.

thanks,

greg k-h
Jens Axboe Dec. 20, 2021, 4:33 p.m. UTC | #2
On 12/20/21 9:01 AM, Greg Kroah-Hartman wrote:
> On Tue, Nov 30, 2021 at 09:46:26AM +0100, Greg Kroah-Hartman wrote:
>> MIPS include files define "PC" so when building the paride driver the
>> following build warning shows up:
>>
>> 	rivers/block/paride/bpck.c:32: warning: "PC" redefined
>>
>> Fix this by undefining PC before redefining it as is done for other
>> defines in this driver.
>>
>> Cc: Tim Waugh <tim@cyberelk.net>
>> Cc: Jens Axboe <axboe@kernel.dk>
>> Cc: linux-block@vger.kernel.org
>> Cc: linux-kernel@vger.kernel.org
>> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
>> ---
>>  drivers/block/paride/bpck.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/drivers/block/paride/bpck.c b/drivers/block/paride/bpck.c
>> index f5f63ca2889d..d880a9465e9b 100644
>> --- a/drivers/block/paride/bpck.c
>> +++ b/drivers/block/paride/bpck.c
>> @@ -28,6 +28,7 @@
>>  
>>  #undef r2
>>  #undef w2
>> +#undef PC
>>  
>>  #define PC			pi->private
>>  #define r2()			(PC=(in_p(2) & 0xff))
>> -- 
>> 2.34.1
>>
> 
> Given the lack of objections to this, I'll just take it through one of
> my trees for 5.17-rc1.

Sorry about that, got lost. I can queue it  up too, or you can add my
acked-by, either is fine.
Greg Kroah-Hartman Dec. 21, 2021, 9:23 a.m. UTC | #3
On Mon, Dec 20, 2021 at 09:33:12AM -0700, Jens Axboe wrote:
> On 12/20/21 9:01 AM, Greg Kroah-Hartman wrote:
> > On Tue, Nov 30, 2021 at 09:46:26AM +0100, Greg Kroah-Hartman wrote:
> >> MIPS include files define "PC" so when building the paride driver the
> >> following build warning shows up:
> >>
> >> 	rivers/block/paride/bpck.c:32: warning: "PC" redefined
> >>
> >> Fix this by undefining PC before redefining it as is done for other
> >> defines in this driver.
> >>
> >> Cc: Tim Waugh <tim@cyberelk.net>
> >> Cc: Jens Axboe <axboe@kernel.dk>
> >> Cc: linux-block@vger.kernel.org
> >> Cc: linux-kernel@vger.kernel.org
> >> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> >> ---
> >>  drivers/block/paride/bpck.c | 1 +
> >>  1 file changed, 1 insertion(+)
> >>
> >> diff --git a/drivers/block/paride/bpck.c b/drivers/block/paride/bpck.c
> >> index f5f63ca2889d..d880a9465e9b 100644
> >> --- a/drivers/block/paride/bpck.c
> >> +++ b/drivers/block/paride/bpck.c
> >> @@ -28,6 +28,7 @@
> >>  
> >>  #undef r2
> >>  #undef w2
> >> +#undef PC
> >>  
> >>  #define PC			pi->private
> >>  #define r2()			(PC=(in_p(2) & 0xff))
> >> -- 
> >> 2.34.1
> >>
> > 
> > Given the lack of objections to this, I'll just take it through one of
> > my trees for 5.17-rc1.
> 
> Sorry about that, got lost. I can queue it  up too, or you can add my
> acked-by, either is fine.

Easy enough for me to take it, now done, thanks!

greg k-h
diff mbox series

Patch

diff --git a/drivers/block/paride/bpck.c b/drivers/block/paride/bpck.c
index f5f63ca2889d..d880a9465e9b 100644
--- a/drivers/block/paride/bpck.c
+++ b/drivers/block/paride/bpck.c
@@ -28,6 +28,7 @@ 
 
 #undef r2
 #undef w2
+#undef PC
 
 #define PC			pi->private
 #define r2()			(PC=(in_p(2) & 0xff))