1. 08 Nov, 2009 2 commits
    • Anton Vorontsov's avatar
      fsl_pq_mdio: Fix compiler/sparse warnings (part 2) · 6748f60b
      Anton Vorontsov authored
      This patch fixes following warnings:
      
      fsl_pq_mdio.c:112:38: warning: cast adds address space to expression (<asn:2>)
      fsl_pq_mdio.c:124:38: warning: cast adds address space to expression (<asn:2>)
      fsl_pq_mdio.c:133:38: warning: cast adds address space to expression (<asn:2>)
      fsl_pq_mdio.c:414:11: warning: cast adds address space to expression (<asn:2>)
      
      Instead of adding __force all over the place, introduce convenient
      fsl_pq_mdio_get_regs() call that does the ugly casting just once.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6748f60b
    • Anton Vorontsov's avatar
      fsl_pq_mdio: Fix compiler/sparse warnings (part 1) · 2951d64e
      Anton Vorontsov authored
      commit 1d2397d7 ("fsl_pq_mdio: Add
      Suport for etsec2.0 devices") introduced the following warnings:
      
        CHECK   fsl_pq_mdio.c
      fsl_pq_mdio.c:287:22: warning: incorrect type in initializer (different base types)
      fsl_pq_mdio.c:287:22:    expected unknown type 11 const *__mptr
      fsl_pq_mdio.c:287:22:    got unsigned long long [unsigned] [assigned] [usertype] addr
      fsl_pq_mdio.c:287:19: warning: incorrect type in assignment (different base types)
      fsl_pq_mdio.c:287:19:    expected unsigned long long [unsigned] [usertype] ioremap_miimcfg
      fsl_pq_mdio.c:287:19:    got struct fsl_pq_mdio *<noident>
        CC      fsl_pq_mdio.o
      fsl_pq_mdio.c: In function 'fsl_pq_mdio_probe':
      fsl_pq_mdio.c:287: warning: initialization makes pointer from integer without a cast
      fsl_pq_mdio.c:287: warning: assignment makes integer from pointer without a cast
      
      These warnings are not easy to fix without ugly __force casts. So,
      instead of introducing the casts, rework the code to substitute an
      offset from an already mapped area. This makes the code a lot simpler
      and less duplicated.
      
      Plus, from now on we don't actually map reserved registers on
      non-etsec2.0 devices, so we have more chances to catch programming
      errors.
      Signed-off-by: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      2951d64e
  2. 07 Nov, 2009 17 commits
  3. 06 Nov, 2009 21 commits