radeon_agp_init fixes
Subsystems (2)
PATCH 1/1 radeon_agp_init fixes
radeon_agp_init fixes
John Kacur (2):
radeon_agp: Fix warning, format ‘%d’ expects type ‘int’, but argument
4 has type ‘size_t’
radeon_agp: Move the check of the aper_size after drm_acp_acquire and
drm_agp_info
drivers/gpu/drm/radeon/radeon_agp.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
PATCH 1/1 radeon_agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
Fix warning by using %zu instead of %d for size_t
--- drivers/gpu/drm/radeon/radeon_agp.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/gpu/drm/radeon/radeon_agp.c +1 -1
@@ -134,7 +134,7 @@ int radeon_agp_init(struct radeon_device *rdev)int ret;if (rdev->ddev->agp->agp_info.aper_size <32 ) { -dev_warn (rdev->dev,"AGP aperture to small (%dM) " +dev_warn (rdev->dev,"AGP aperture to small (%zuM) " "need at least 32M, disabling AGP\n" , rdev->ddev->agp->agp_info.aper_size);return -EINVAL ;
Signature · 10 lines
1.6.0.6 ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --
Re: [PATCH] radeon_agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
Quoted 12 lines · John Kacur
Fix warning by using %zu instead of %d for
size_tSigned-off-by John Kacur <[email protected]>---
drivers/gpu/drm/radeon/radeon_agp.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/radeon_agp.c +0
-0
drivers/gpu/drm/radeon/radeon_agp.c int radeon_agp_init(struct radeon_device *rdev) · line 137
Quoted 5 lines
drivers/gpu/drm/radeon/radeon_agp.c +1
-1@@ -134,7 +134,7 @@ int radeon_agp_init(struct radeon_device *rdev) int ret; if (rdev->ddev->agp->agp_info.aper_size < 32) { - dev_warn(rdev->dev, "AGP aperture to small (%dM) " + dev_warn(rdev->dev, "AGP aperture to small (%zuM) "
As long as you're fixing this line, you might want to correct the grammar s/to/too/.
--
Dan
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] radeon_agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
In reply to John KacurQuoted 12 lines · John Kacur
Fix warning by using %zu instead of %d for
size_tSigned-off-by John Kacur <[email protected]>---
drivers/gpu/drm/radeon/radeon_agp.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/radeon_agp.c +0
-0
drivers/gpu/drm/radeon/radeon_agp.c int radeon_agp_init(struct radeon_device *rdev) · line 137
Quoted 5 lines
drivers/gpu/drm/radeon/radeon_agp.c +1
-1@@ -134,7 +134,7 @@ int radeon_agp_init(struct radeon_device *rdev) int ret; if (rdev->ddev->agp->agp_info.aper_size < 32) { - dev_warn(rdev->dev, "AGP aperture to small (%dM) " + dev_warn(rdev->dev, "AGP aperture to small (%zuM) "
As long as you're fixing this line, you might want to correct the grammar s/to/too/.
--
Dan
Re: [PATCH] radeon_agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
Quoted 15 lines · Dan Nicholson
Quoted 14 lines · John Kacur
Fix warning by using %zu instead of %d for
size_tSigned-off-by John Kacur <[email protected]>---
drivers/gpu/drm/radeon/radeon_agp.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/radeon_agp.c +0
-0@@ -134,7 +134,7 @@ int radeon_agp_init(struct radeon_device *rdev) int ret;
Quoted 6 lines
drivers/gpu/drm/radeon/radeon_agp.c int radeon_agp_init(struct radeon_device *rdev) · line 137
Quoted 3 lines
drivers/gpu/drm/radeon/radeon_agp.c +1
-1if (rdev->ddev->agp->agp_info.aper_size < 32) { - dev_warn(rdev->dev, "AGP aperture to small (%dM) " + dev_warn(rdev->dev, "AGP aperture to small (%zuM) "As long as you're fixing this line, you might want to correct the grammar s/to/too/.
Thanks, I saw that too, after I sent. Unfortunately, I have to respin both patches, because there is a merge conflict after fixing the grammar/spelling mistake.
Both patches coming up, in a separate mail.
John
------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--
_______________________________________________
Dri-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] radeon_agp: Fix warning, format ‘%d’ expects type ‘int’, but argument 4 has type ‘size_t’
In reply to Dan NicholsonQuoted 15 lines · Dan Nicholson
Quoted 14 lines · John Kacur
Fix warning by using %zu instead of %d for
size_tSigned-off-by John Kacur <[email protected]>---
drivers/gpu/drm/radeon/radeon_agp.c | 2 +-1 files changed, 1 insertions(+), 1 deletions(-)drivers/gpu/drm/radeon/radeon_agp.c +0
-0@@ -134,7 +134,7 @@ int radeon_agp_init(struct radeon_device *rdev) int ret;
Quoted 6 lines
drivers/gpu/drm/radeon/radeon_agp.c int radeon_agp_init(struct radeon_device *rdev) · line 137
Quoted 3 lines
drivers/gpu/drm/radeon/radeon_agp.c +1
-1if (rdev->ddev->agp->agp_info.aper_size < 32) { - dev_warn(rdev->dev, "AGP aperture to small (%dM) " + dev_warn(rdev->dev, "AGP aperture to small (%zuM) "As long as you're fixing this line, you might want to correct the grammar s/to/too/.
Thanks, I saw that too, after I sent. Unfortunately, I have to respin both patches, because there is a merge conflict after fixing the grammar/spelling mistake.
Both patches coming up, in a separate mail.
John
PATCH 1/1 radeon_agp: Move the check of the aper_size after drm_acp_acquire and drm_agp_info
In reply to John KacurFirst call drm_agp_acquire to check if agp has been acquired. Second call drm_agp_info to fill in the info data struct, including aper_size. Finally do the check to see if the aper_size makes sense.
--- drivers/gpu/drm/radeon/radeon_agp.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/radeon_agp.c +8 -7
@@ -133,13 +133,6 @@ int radeon_agp_init(struct radeon_device *rdev)bool is_v3;int ret; -if (rdev->ddev->agp->agp_info.aper_size <32 ) { -dev_warn (rdev->dev,"AGP aperture to small (%zuM) " -"need at least 32M, disabling AGP\n" , - rdev->ddev->agp->agp_info.aper_size); -return -EINVAL ; - } -/* Acquire AGP. */ if (!rdev->ddev->agp->acquired) { ret =drm_agp_acquire (rdev->ddev);
@@ -154,6 +147,14 @@ int radeon_agp_init(struct radeon_device *rdev)DRM_ERROR ("Unable to get AGP info: %d\n" , ret);return ret; } + +if (rdev->ddev->agp->agp_info.aper_size <32 ) { +dev_warn (rdev->dev,"AGP aperture to small (%zuM) " +"need at least 32M, disabling AGP\n" , + rdev->ddev->agp->agp_info.aper_size); +return -EINVAL ; + } + mode.mode = info.mode; agp_status = (RREG32 (RADEON_AGP_STATUS ) | RADEON_AGPv3_MODE) & mode.mode; is_v3 = !!(agp_status & RADEON_AGPv3_MODE);
Signature · 10 lines
1.6.0.6 ------------------------------------------------------------------------------ The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away. http://p.sf.net/sfu/theplanet-com --
PATCH 1/1 radeon_agp: Move the check of the aper_size after drm_acp_acquire and drm_agp_info
In reply to John KacurFirst call drm_agp_acquire to check if agp has been acquired. Second call drm_agp_info to fill in the info data struct, including aper_size. Finally do the check to see if the aper_size makes sense.
--- drivers/gpu/drm/radeon/radeon_agp.c | 15 ++++++++------- 1 files changed, 8 insertions(+), 7 deletions(-)
drivers/gpu/drm/radeon/radeon_agp.c +8 -7
@@ -133,13 +133,6 @@ int radeon_agp_init(struct radeon_device *rdev)bool is_v3;int ret; -if (rdev->ddev->agp->agp_info.aper_size <32 ) { -dev_warn (rdev->dev,"AGP aperture to small (%zuM) " -"need at least 32M, disabling AGP\n" , - rdev->ddev->agp->agp_info.aper_size); -return -EINVAL ; - } -/* Acquire AGP. */ if (!rdev->ddev->agp->acquired) { ret =drm_agp_acquire (rdev->ddev);
@@ -154,6 +147,14 @@ int radeon_agp_init(struct radeon_device *rdev)DRM_ERROR ("Unable to get AGP info: %d\n" , ret);return ret; } + +if (rdev->ddev->agp->agp_info.aper_size <32 ) { +dev_warn (rdev->dev,"AGP aperture to small (%zuM) " +"need at least 32M, disabling AGP\n" , + rdev->ddev->agp->agp_info.aper_size); +return -EINVAL ; + } + mode.mode = info.mode; agp_status = (RREG32 (RADEON_AGP_STATUS ) | RADEON_AGPv3_MODE) & mode.mode; is_v3 = !!(agp_status & RADEON_AGPv3_MODE);
Signature · 1 line
1.6.0.6