* [PATCH 1/1] drivers/scsi/vmw_pvscsi.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE
@ 2014-06-14 22:19 Fabian Frederick
2014-06-17 20:44 ` Arvind Kumar
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-06-14 22:19 UTC (permalink / raw)
To: linux-kernel; +Cc: Fabian Frederick, Arvind Kumar, VMware PV-Drivers
use mm.h definition
Cc: Arvind Kumar <arvindkumar@vmware.com>
Cc: VMware PV-Drivers <pv-drivers@vmware.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/scsi/vmw_pvscsi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index c88e146..07dc492 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -439,9 +439,9 @@ static int pvscsi_allocate_rings(struct pvscsi_adapter *adapter)
if (!adapter->cmp_ring)
return -ENOMEM;
- BUG_ON(!IS_ALIGNED(adapter->ringStatePA, PAGE_SIZE));
- BUG_ON(!IS_ALIGNED(adapter->reqRingPA, PAGE_SIZE));
- BUG_ON(!IS_ALIGNED(adapter->cmpRingPA, PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED(adapter->ringStatePA));
+ BUG_ON(!PAGE_ALIGNED(adapter->reqRingPA));
+ BUG_ON(!PAGE_ALIGNED(adapter->cmpRingPA));
if (!adapter->use_msg)
return 0;
@@ -453,7 +453,7 @@ static int pvscsi_allocate_rings(struct pvscsi_adapter *adapter)
&adapter->msgRingPA);
if (!adapter->msg_ring)
return -ENOMEM;
- BUG_ON(!IS_ALIGNED(adapter->msgRingPA, PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED(adapter->msgRingPA));
return 0;
}
@@ -1280,7 +1280,7 @@ static int pvscsi_allocate_sg(struct pvscsi_adapter *adapter)
ctx->sgl = (void *)__get_free_pages(GFP_KERNEL,
get_order(SGL_SIZE));
ctx->sglPA = 0;
- BUG_ON(!IS_ALIGNED(((unsigned long)ctx->sgl), PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED((ctx->sgl)));
if (!ctx->sgl) {
for (; i >= 0; --i, --ctx) {
free_pages((unsigned long)ctx->sgl,
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1] drivers/scsi/vmw_pvscsi.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE
2014-06-14 22:19 [PATCH 1/1] drivers/scsi/vmw_pvscsi.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE Fabian Frederick
@ 2014-06-17 20:44 ` Arvind Kumar
0 siblings, 0 replies; 2+ messages in thread
From: Arvind Kumar @ 2014-06-17 20:44 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, VMware PV-Drivers
Thanks for the patch Fabian!
It looks fine to me. I think you should also include the emails listed by running 'scripts/get_maintainer.pl <your-patch>'.
Acked-by: Arvind Kumar <arvindkumar@vmware.com>
Thanks!
Arvind
----- Original Message -----
From: "Fabian Frederick" <fabf@skynet.be>
To: linux-kernel@vger.kernel.org
Cc: "Fabian Frederick" <fabf@skynet.be>, "Arvind Kumar" <arvindkumar@vmware.com>, "VMware PV-Drivers" <pv-drivers@vmware.com>
Sent: Saturday, June 14, 2014 3:19:49 PM
Subject: [PATCH 1/1] drivers/scsi/vmw_pvscsi.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE
use mm.h definition
Cc: Arvind Kumar <arvindkumar@vmware.com>
Cc: VMware PV-Drivers <pv-drivers@vmware.com>
Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
drivers/scsi/vmw_pvscsi.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/scsi/vmw_pvscsi.c b/drivers/scsi/vmw_pvscsi.c
index c88e146..07dc492 100644
--- a/drivers/scsi/vmw_pvscsi.c
+++ b/drivers/scsi/vmw_pvscsi.c
@@ -439,9 +439,9 @@ static int pvscsi_allocate_rings(struct pvscsi_adapter *adapter)
if (!adapter->cmp_ring)
return -ENOMEM;
- BUG_ON(!IS_ALIGNED(adapter->ringStatePA, PAGE_SIZE));
- BUG_ON(!IS_ALIGNED(adapter->reqRingPA, PAGE_SIZE));
- BUG_ON(!IS_ALIGNED(adapter->cmpRingPA, PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED(adapter->ringStatePA));
+ BUG_ON(!PAGE_ALIGNED(adapter->reqRingPA));
+ BUG_ON(!PAGE_ALIGNED(adapter->cmpRingPA));
if (!adapter->use_msg)
return 0;
@@ -453,7 +453,7 @@ static int pvscsi_allocate_rings(struct pvscsi_adapter *adapter)
&adapter->msgRingPA);
if (!adapter->msg_ring)
return -ENOMEM;
- BUG_ON(!IS_ALIGNED(adapter->msgRingPA, PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED(adapter->msgRingPA));
return 0;
}
@@ -1280,7 +1280,7 @@ static int pvscsi_allocate_sg(struct pvscsi_adapter *adapter)
ctx->sgl = (void *)__get_free_pages(GFP_KERNEL,
get_order(SGL_SIZE));
ctx->sglPA = 0;
- BUG_ON(!IS_ALIGNED(((unsigned long)ctx->sgl), PAGE_SIZE));
+ BUG_ON(!PAGE_ALIGNED((ctx->sgl)));
if (!ctx->sgl) {
for (; i >= 0; --i, --ctx) {
free_pages((unsigned long)ctx->sgl,
--
1.8.4.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-06-17 20:54 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-14 22:19 [PATCH 1/1] drivers/scsi/vmw_pvscsi.c: use PAGE_ALIGNED instead of IS_ALIGNED(PAGE_SIZE Fabian Frederick
2014-06-17 20:44 ` Arvind Kumar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox