CC: [email protected]
CC: [email protected]
In-Reply-To: <[email protected]>
References: <[email protected]>
TO: Richard Cochran <[email protected]>

Hi Richard,

[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Richard-Cochran/Make-MAC-PHY-time-stamping-selectable/20220104-072717
base:   https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 
3d694552fd8fe502e7ffd22ffa0e085bfd73b19a
:::::: branch date: 7 days ago
:::::: commit date: 7 days ago
config: x86_64-randconfig-c007-20220105 
(https://download.01.org/0day-ci/archive/20220110/[email protected]/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 
d5b6e30ed3acad794dd0aec400e617daffc6cc3d)
reproduce (this is a W=1 build):
        wget 
https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O 
~/bin/make.cross
        chmod +x ~/bin/make.cross
        # 
https://github.com/0day-ci/linux/commit/33070417b78b3844a2b2f55f94313072859da977
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review 
Richard-Cochran/Make-MAC-PHY-time-stamping-selectable/20220104-072717
        git checkout 33070417b78b3844a2b2f55f94313072859da977
        # save the config file to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 
clang-analyzer 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <[email protected]>


clang-analyzer warnings: (new ones prefixed by >>)
                              ^
   include/linux/compiler_types.h:302:3: note: expanded from macro 
'__native_word'
           (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
            ^
   drivers/infiniband/core/addr.c:508:28: note: Left side of '||' is false
           struct net_device *ndev = READ_ONCE(dst->dev);
                                     ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:21: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
                              ^
   include/linux/compiler_types.h:302:3: note: expanded from macro 
'__native_word'
           (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
            ^
   drivers/infiniband/core/addr.c:508:28: note: Left side of '||' is false
           struct net_device *ndev = READ_ONCE(dst->dev);
                                     ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:21: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
                              ^
   include/linux/compiler_types.h:302:3: note: expanded from macro 
'__native_word'
           (sizeof(t) == sizeof(char) || sizeof(t) == sizeof(short) || \
            ^
   drivers/infiniband/core/addr.c:508:28: note: Left side of '||' is true
           struct net_device *ndev = READ_ONCE(dst->dev);
                                     ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:38: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
                                               ^
   drivers/infiniband/core/addr.c:508:28: note: Taking false branch
           struct net_device *ndev = READ_ONCE(dst->dev);
                                     ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:2: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
           ^
   include/linux/compiler_types.h:335:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:323:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:315:3: note: expanded from macro 
'__compiletime_assert'
                   if (!(condition))                                       \
                   ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   drivers/infiniband/core/addr.c:508:28: note: Loop condition is false.  
Exiting loop
           struct net_device *ndev = READ_ONCE(dst->dev);
                                     ^
   include/asm-generic/rwonce.h:49:2: note: expanded from macro 'READ_ONCE'
           compiletime_assert_rwonce_type(x);                              \
           ^
   include/asm-generic/rwonce.h:36:2: note: expanded from macro 
'compiletime_assert_rwonce_type'
           compiletime_assert(__native_word(t) || sizeof(t) == sizeof(long 
long),  \
           ^
   include/linux/compiler_types.h:335:2: note: expanded from macro 
'compiletime_assert'
           _compiletime_assert(condition, msg, __compiletime_assert_, 
__COUNTER__)
           ^
   include/linux/compiler_types.h:323:2: note: expanded from macro 
'_compiletime_assert'
           __compiletime_assert(condition, msg, prefix, suffix)
           ^
   include/linux/compiler_types.h:307:2: note: expanded from macro 
'__compiletime_assert'
           do {                                                            \
           ^
   drivers/infiniband/core/addr.c:508:28: note: Dereference of null pointer
           struct net_device *ndev = READ_ONCE(dst->dev);
                                     ^
   include/asm-generic/rwonce.h:50:2: note: expanded from macro 'READ_ONCE'
           __READ_ONCE(x);                                                 \
           ^~~~~~~~~~~~~~
   include/asm-generic/rwonce.h:44:24: note: expanded from macro '__READ_ONCE'
   #define __READ_ONCE(x)  (*(const volatile __unqual_scalar_typeof(x) *)&(x))
                           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   16 warnings generated.
   net/core/net-sysfs.c:632:2: warning: Value stored to 'ops' is never read 
[clang-analyzer-deadcode.DeadStores]
           ops = netdev->ethtool_ops;
           ^     ~~~~~~~~~~~~~~~~~~~
   net/core/net-sysfs.c:632:2: note: Value stored to 'ops' is never read
           ops = netdev->ethtool_ops;
           ^     ~~~~~~~~~~~~~~~~~~~
   net/core/net-sysfs.c:642:3: warning: Value stored to 'buf' is never read 
[clang-analyzer-deadcode.DeadStores]
                   buf += 4;
                   ^      ~
   net/core/net-sysfs.c:642:3: note: Value stored to 'buf' is never read
                   buf += 4;
                   ^      ~
>> net/core/net-sysfs.c:661:2: warning: Value stored to 'phydev' is never read 
>> [clang-analyzer-deadcode.DeadStores]
           phydev = netdev->phydev;
           ^        ~~~~~~~~~~~~~~
   net/core/net-sysfs.c:661:2: note: Value stored to 'phydev' is never read
           phydev = netdev->phydev;
           ^        ~~~~~~~~~~~~~~
   net/core/net-sysfs.c:662:2: warning: Value stored to 'ops' is never read 
[clang-analyzer-deadcode.DeadStores]
           ops = netdev->ethtool_ops;
           ^     ~~~~~~~~~~~~~~~~~~~
   net/core/net-sysfs.c:662:2: note: Value stored to 'ops' is never read
           ops = netdev->ethtool_ops;
           ^     ~~~~~~~~~~~~~~~~~~~
   net/core/net-sysfs.c:1871:2: warning: Value stored to 'txq' is never read 
[clang-analyzer-deadcode.DeadStores]
           txq = real_tx;
           ^     ~~~~~~~
   net/core/net-sysfs.c:1871:2: note: Value stored to 'txq' is never read
           txq = real_tx;
           ^     ~~~~~~~
   Suppressed 11 warnings (8 in non-user code, 3 with check filters).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   8 warnings generated.
   Suppressed 8 warnings (8 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   57 warnings generated.
   Suppressed 57 warnings (57 in non-user code).
   Use -header-filter=.* to display errors from all non-system headers. Use 
-system-headers to display errors from system headers as well.
   9 warnings generated.
   net/core/drop_monitor.c:870:2: warning: 1st function call argument is an 
uninitialized value [clang-analyzer-core.CallAndMessage]
           kfree(hw_metadata->fa_cookie);
           ^
   net/core/drop_monitor.c:941:6: note: Assuming field 'trap_type' is not equal 
to DEVLINK_TRAP_TYPE_CONTROL
           if (metadata->trap_type == DEVLINK_TRAP_TYPE_CONTROL)
               ^
   include/linux/compiler.h:56:47: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                                                 ^~~~
   include/linux/compiler.h:58:52: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                      ^~~~
   net/core/drop_monitor.c:941:2: note: '?' condition is false
           if (metadata->trap_type == DEVLINK_TRAP_TYPE_CONTROL)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   net/core/drop_monitor.c:941:16: note: Field 'trap_type' is not equal to 
DEVLINK_TRAP_TYPE_CONTROL
           if (metadata->trap_type == DEVLINK_TRAP_TYPE_CONTROL)
                         ^
   net/core/drop_monitor.c:941:2: note: '?' condition is false
           if (metadata->trap_type == DEVLINK_TRAP_TYPE_CONTROL)
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   net/core/drop_monitor.c:941:2: note: Taking false branch
           if (metadata->trap_type == DEVLINK_TRAP_TYPE_CONTROL)
           ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   net/core/drop_monitor.c:944:2: note: '?' condition is false
           if (!skb_mac_header_was_set(skb))
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:31: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                 ^
   net/core/drop_monitor.c:944:2: note: '?' condition is false
           if (!skb_mac_header_was_set(skb))
           ^
   include/linux/compiler.h:56:28: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                              ^
   include/linux/compiler.h:58:69: note: expanded from macro '__trace_if_var'
   #define __trace_if_var(cond) (__builtin_constant_p(cond) ? (cond) : 
__trace_if_value(cond))
                                                                       ^
   include/linux/compiler.h:69:2: note: expanded from macro '__trace_if_value'
           (cond) ?                                        \
           ^
   net/core/drop_monitor.c:944:2: note: Taking false branch
           if (!skb_mac_header_was_set(skb))
           ^
   include/linux/compiler.h:56:23: note: expanded from macro 'if'
   #define if(cond, ...) if ( __trace_if_var( !!(cond , ## __VA_ARGS__) ) )
                         ^
   net/core/drop_monitor.c:948:6: note: Assuming 'nskb' is non-null
           if (!nskb)

vim +/phydev +661 net/core/net-sysfs.c

5fdd2f0e5c6484 Wei Wang        2021-02-08  620  
c7ffd872b92c08 Richard Cochran 2022-01-03  621  static ssize_t 
available_timestamping_providers_show(struct device *dev,
c7ffd872b92c08 Richard Cochran 2022-01-03  622                                  
                     struct device_attribute *attr,
c7ffd872b92c08 Richard Cochran 2022-01-03  623                                  
                     char *buf)
c7ffd872b92c08 Richard Cochran 2022-01-03  624  {
c7ffd872b92c08 Richard Cochran 2022-01-03  625          const struct 
ethtool_ops *ops;
c7ffd872b92c08 Richard Cochran 2022-01-03  626          struct net_device 
*netdev;
c7ffd872b92c08 Richard Cochran 2022-01-03  627          struct phy_device 
*phydev;
c7ffd872b92c08 Richard Cochran 2022-01-03  628          int ret = 0;
c7ffd872b92c08 Richard Cochran 2022-01-03  629  
c7ffd872b92c08 Richard Cochran 2022-01-03  630          netdev = 
to_net_dev(dev);
c7ffd872b92c08 Richard Cochran 2022-01-03  631          phydev = netdev->phydev;
c7ffd872b92c08 Richard Cochran 2022-01-03 @632          ops = 
netdev->ethtool_ops;
c7ffd872b92c08 Richard Cochran 2022-01-03  633  
c7ffd872b92c08 Richard Cochran 2022-01-03  634          if (!rtnl_trylock())
c7ffd872b92c08 Richard Cochran 2022-01-03  635                  return 
restart_syscall();
c7ffd872b92c08 Richard Cochran 2022-01-03  636  
c7ffd872b92c08 Richard Cochran 2022-01-03  637          ret += sprintf(buf, 
"%s\n", "mac");
c7ffd872b92c08 Richard Cochran 2022-01-03  638          buf += 4;
c7ffd872b92c08 Richard Cochran 2022-01-03  639  
c7ffd872b92c08 Richard Cochran 2022-01-03  640          if 
(phy_has_tsinfo(phydev)) {
c7ffd872b92c08 Richard Cochran 2022-01-03  641                  ret += 
sprintf(buf, "%s\n", "phy");
c7ffd872b92c08 Richard Cochran 2022-01-03  642                  buf += 4;
c7ffd872b92c08 Richard Cochran 2022-01-03  643          }
c7ffd872b92c08 Richard Cochran 2022-01-03  644  
c7ffd872b92c08 Richard Cochran 2022-01-03  645          rtnl_unlock();
c7ffd872b92c08 Richard Cochran 2022-01-03  646  
c7ffd872b92c08 Richard Cochran 2022-01-03  647          return ret;
c7ffd872b92c08 Richard Cochran 2022-01-03  648  }
c7ffd872b92c08 Richard Cochran 2022-01-03  649  static 
DEVICE_ATTR_RO(available_timestamping_providers);
c7ffd872b92c08 Richard Cochran 2022-01-03  650  
c7ffd872b92c08 Richard Cochran 2022-01-03  651  static ssize_t 
current_timestamping_provider_show(struct device *dev,
c7ffd872b92c08 Richard Cochran 2022-01-03  652                                  
                  struct device_attribute *attr,
c7ffd872b92c08 Richard Cochran 2022-01-03  653                                  
                  char *buf)
c7ffd872b92c08 Richard Cochran 2022-01-03  654  {
c7ffd872b92c08 Richard Cochran 2022-01-03  655          const struct 
ethtool_ops *ops;
c7ffd872b92c08 Richard Cochran 2022-01-03  656          struct net_device 
*netdev;
c7ffd872b92c08 Richard Cochran 2022-01-03  657          struct phy_device 
*phydev;
c7ffd872b92c08 Richard Cochran 2022-01-03  658          int ret;
c7ffd872b92c08 Richard Cochran 2022-01-03  659  
c7ffd872b92c08 Richard Cochran 2022-01-03  660          netdev = 
to_net_dev(dev);
c7ffd872b92c08 Richard Cochran 2022-01-03 @661          phydev = netdev->phydev;
c7ffd872b92c08 Richard Cochran 2022-01-03  662          ops = 
netdev->ethtool_ops;
c7ffd872b92c08 Richard Cochran 2022-01-03  663  
c7ffd872b92c08 Richard Cochran 2022-01-03  664          if (!rtnl_trylock())
c7ffd872b92c08 Richard Cochran 2022-01-03  665                  return 
restart_syscall();
c7ffd872b92c08 Richard Cochran 2022-01-03  666  
33070417b78b38 Richard Cochran 2022-01-03  667          switch 
(netdev->selected_timestamping_layer) {
33070417b78b38 Richard Cochran 2022-01-03  668          case MAC_TIMESTAMPING:
c7ffd872b92c08 Richard Cochran 2022-01-03  669                  ret = 
sprintf(buf, "%s\n", "mac");
33070417b78b38 Richard Cochran 2022-01-03  670                  break;
33070417b78b38 Richard Cochran 2022-01-03  671          case PHY_TIMESTAMPING:
33070417b78b38 Richard Cochran 2022-01-03  672                  ret = 
sprintf(buf, "%s\n", "phy");
33070417b78b38 Richard Cochran 2022-01-03  673                  break;
c7ffd872b92c08 Richard Cochran 2022-01-03  674          }
c7ffd872b92c08 Richard Cochran 2022-01-03  675  
c7ffd872b92c08 Richard Cochran 2022-01-03  676          rtnl_unlock();
c7ffd872b92c08 Richard Cochran 2022-01-03  677  
c7ffd872b92c08 Richard Cochran 2022-01-03  678          return ret;
c7ffd872b92c08 Richard Cochran 2022-01-03  679  }
33070417b78b38 Richard Cochran 2022-01-03  680  

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
_______________________________________________
kbuild mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to