]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Mon, 10 May 2021 16:39:30 +0000 (19:39 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 20 Jul 2021 14:21:06 +0000 (16:21 +0200)
commit676859eeb51f74d63ae40f7bfa1b986109875251
treee9f03950ae9d3e8dc0f3a5ab4c6a1d1b2019990b
parentfe1f45c5466af7e83cd3e2651f136de51bf3f8e9
net: pch_gbe: Use proper accessors to BE data in pch_ptp_match()

[ Upstream commit 443ef39b499cc9c6635f83238101f1bb923e9326 ]

Sparse is not happy about handling of strict types in pch_ptp_match():

  .../pch_gbe_main.c:158:33: warning: incorrect type in argument 2 (different base types)
  .../pch_gbe_main.c:158:33:    expected unsigned short [usertype] uid_hi
  .../pch_gbe_main.c:158:33:    got restricted __be16 [usertype]
  .../pch_gbe_main.c:158:45: warning: incorrect type in argument 3 (different base types)
  .../pch_gbe_main.c:158:45:    expected unsigned int [usertype] uid_lo
  .../pch_gbe_main.c:158:45:    got restricted __be32 [usertype]
  .../pch_gbe_main.c:158:56: warning: incorrect type in argument 4 (different base types)
  .../pch_gbe_main.c:158:56:    expected unsigned short [usertype] seqid
  .../pch_gbe_main.c:158:56:    got restricted __be16 [usertype]

Fix that by switching to use proper accessors to BE data.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Tested-by: Flavio Suligoi <f.suligoi@asem.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/oki-semi/pch_gbe/pch_gbe_main.c