linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] edac: Fix build error caused by wrong member access
@ 2014-08-19 21:10 Pranith Kumar
  2014-08-21 21:28 ` Andrew Morton
  2014-09-15 12:21 ` Borislav Petkov
  0 siblings, 2 replies; 4+ messages in thread
From: Pranith Kumar @ 2014-08-19 21:10 UTC (permalink / raw)
  To: Doug Thompson, Borislav Petkov, Mauro Carvalho Chehab,
	open list:EDAC-CORE, open list
  Cc: Andre Morton

Fix the following error 

drivers/edac/ppc4xx_edac.c:977:45: error: request for member 'dimm' in something
not a structure or union

by changing member access to pointer dereference

Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
CC: Andre Morton <akpm@linux-foundation.org>
---
 drivers/edac/ppc4xx_edac.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/ppc4xx_edac.c b/drivers/edac/ppc4xx_edac.c
index ef6b7e0..0f04d5e 100644
--- a/drivers/edac/ppc4xx_edac.c
+++ b/drivers/edac/ppc4xx_edac.c
@@ -974,7 +974,7 @@ static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
 		 * page size (PAGE_SIZE) or the memory width (2 or 4).
 		 */
 		for (j = 0; j < csi->nr_channels; j++) {
-			struct dimm_info *dimm = csi->channels[j].dimm;
+			struct dimm_info *dimm = csi->channels[j]->dimm;
 
 			dimm->nr_pages  = nr_pages / csi->nr_channels;
 			dimm->grain	= 1;
-- 
1.9.1


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

* Re: [PATCH] edac: Fix build error caused by wrong member access
  2014-08-19 21:10 [PATCH] edac: Fix build error caused by wrong member access Pranith Kumar
@ 2014-08-21 21:28 ` Andrew Morton
  2014-08-21 23:46   ` Pranith Kumar
  2014-09-15 12:21 ` Borislav Petkov
  1 sibling, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2014-08-21 21:28 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Doug Thompson, Borislav Petkov, Mauro Carvalho Chehab,
	open list:EDAC-CORE, open list

On Tue, 19 Aug 2014 17:10:46 -0400 Pranith Kumar <bobby.prani@gmail.com> wrote:

> Fix the following error 
> 
> drivers/edac/ppc4xx_edac.c:977:45: error: request for member 'dimm' in something
> not a structure or union
> 
> by changing member access to pointer dereference
> 
> --- a/drivers/edac/ppc4xx_edac.c
> +++ b/drivers/edac/ppc4xx_edac.c
> @@ -974,7 +974,7 @@ static int ppc4xx_edac_init_csrows(struct mem_ctl_info *mci, u32 mcopt1)
>  		 * page size (PAGE_SIZE) or the memory width (2 or 4).
>  		 */
>  		for (j = 0; j < csi->nr_channels; j++) {
> -			struct dimm_info *dimm = csi->channels[j].dimm;
> +			struct dimm_info *dimm = csi->channels[j]->dimm;
>  
>  			dimm->nr_pages  = nr_pages / csi->nr_channels;
>  			dimm->grain	= 1;

This driver seems pretty unhealthy and I suspect it has been
broken for quite a while.

drivers/edac/ppc4xx_edac.c: In function 'mfsdram':
drivers/edac/ppc4xx_edac.c:249: error: implicit declaration of function '__mfdcri'
drivers/edac/ppc4xx_edac.c: In function 'mtsdram':
drivers/edac/ppc4xx_edac.c:266: error: implicit declaration of function '__mtdcri'
drivers/edac/ppc4xx_edac.c:269: warning: 'return' with a value, in function returning void
drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_init_csrows':
drivers/edac/ppc4xx_edac.c:924: warning: initialization from incompatible pointer type
drivers/edac/ppc4xx_edac.c:977: error: request for member 'dimm' in something not a structure or union
drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_map_dcrs':
drivers/edac/ppc4xx_edac.c:1209: warning: passing argument 1 of 'dcr_map_mmio' discards qualifiers from pointer target type



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

* Re: [PATCH] edac: Fix build error caused by wrong member access
  2014-08-21 21:28 ` Andrew Morton
@ 2014-08-21 23:46   ` Pranith Kumar
  0 siblings, 0 replies; 4+ messages in thread
From: Pranith Kumar @ 2014-08-21 23:46 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Doug Thompson, Borislav Petkov, Mauro Carvalho Chehab,
	open list:EDAC-CORE, open list

On Thu, Aug 21, 2014 at 5:28 PM, Andrew Morton
<akpm@linux-foundation.org> wrote:
>
> This driver seems pretty unhealthy and I suspect it has been
> broken for quite a while.
>
> drivers/edac/ppc4xx_edac.c: In function 'mfsdram':
> drivers/edac/ppc4xx_edac.c:249: error: implicit declaration of function '__mfdcri'
> drivers/edac/ppc4xx_edac.c: In function 'mtsdram':
> drivers/edac/ppc4xx_edac.c:266: error: implicit declaration of function '__mtdcri'
> drivers/edac/ppc4xx_edac.c:269: warning: 'return' with a value, in function returning void
> drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_init_csrows':
> drivers/edac/ppc4xx_edac.c:924: warning: initialization from incompatible pointer type
> drivers/edac/ppc4xx_edac.c:977: error: request for member 'dimm' in something not a structure or union
> drivers/edac/ppc4xx_edac.c: In function 'ppc4xx_edac_map_dcrs':
> drivers/edac/ppc4xx_edac.c:1209: warning: passing argument 1 of 'dcr_map_mmio' discards qualifiers from pointer target type
>
>

Yes, not sure if anyone is actually using it.

Anways, I will send in a patch to fix the errors which you point out here.

-- 
Pranith

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

* Re: [PATCH] edac: Fix build error caused by wrong member access
  2014-08-19 21:10 [PATCH] edac: Fix build error caused by wrong member access Pranith Kumar
  2014-08-21 21:28 ` Andrew Morton
@ 2014-09-15 12:21 ` Borislav Petkov
  1 sibling, 0 replies; 4+ messages in thread
From: Borislav Petkov @ 2014-09-15 12:21 UTC (permalink / raw)
  To: Pranith Kumar
  Cc: Doug Thompson, Mauro Carvalho Chehab, open list:EDAC-CORE,
	open list, Andre Morton

On Tue, Aug 19, 2014 at 05:10:46PM -0400, Pranith Kumar wrote:
> Fix the following error 
> 
> drivers/edac/ppc4xx_edac.c:977:45: error: request for member 'dimm' in something
> not a structure or union
> 
> by changing member access to pointer dereference
> 
> Signed-off-by: Pranith Kumar <bobby.prani@gmail.com>
> CC: Andre Morton <akpm@linux-foundation.org>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.
--

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

end of thread, other threads:[~2014-09-15 12:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-19 21:10 [PATCH] edac: Fix build error caused by wrong member access Pranith Kumar
2014-08-21 21:28 ` Andrew Morton
2014-08-21 23:46   ` Pranith Kumar
2014-09-15 12:21 ` Borislav Petkov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).