From: kernel test robot <lkp@intel.com>
To: Jason Gunthorpe <jgg@nvidia.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [jgunthorpe:iommu_fwspec 38/42] include/linux/iommu-driver.h:250:17: warning: argument 1 null where non-null expected
Date: Thu, 30 Nov 2023 19:52:00 +0800 [thread overview]
Message-ID: <202311301910.MVTzrEVT-lkp@intel.com> (raw)
tree: https://github.com/jgunthorpe/linux iommu_fwspec
head: ce7d68fa9f538ed4b9c8097e7f1b822ff7301876
commit: f2b38914e20dbb088201ca774735be83294006bd [38/42] iommu/arm-smmu: Move to iommu_of_xlate()
config: x86_64-buildonly-randconfig-003-20231130 (https://download.01.org/0day-ci/archive/20231130/202311301910.MVTzrEVT-lkp@intel.com/config)
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231130/202311301910.MVTzrEVT-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202311301910.MVTzrEVT-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from drivers/iommu/arm/arm-smmu/arm-smmu.c:37:
drivers/iommu/arm/arm-smmu/arm-smmu.c: In function 'arm_smmu_probe_new_master':
>> include/linux/iommu-driver.h:250:17: warning: argument 1 null where non-null expected [-Wnonnull]
250 | memset(params, 0, sizeof(*(params))); \
| ^~~~~~
drivers/iommu/arm/arm-smmu/arm-smmu.c:1313:16: note: in expansion of macro 'iommu_iort_get_single_iommu'
1313 | smmu = iommu_iort_get_single_iommu(pinf, &arm_smmu_ops, NULL,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/x86/include/asm/string.h:5,
from arch/x86/include/asm/cpuid.h:9,
from arch/x86/include/asm/processor.h:19,
from arch/x86/include/asm/cpufeature.h:5,
from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:60,
from arch/x86/include/asm/preempt.h:9,
from include/linux/preempt.h:79,
from include/linux/spinlock.h:56,
from include/linux/mmzone.h:8,
from include/linux/gfp.h:7,
from include/linux/slab.h:16,
from include/linux/resource_ext.h:11,
from include/linux/acpi.h:13,
from drivers/iommu/arm/arm-smmu/arm-smmu.c:20:
arch/x86/include/asm/string_64.h:22:7: note: in a call to function 'memset' declared 'nonnull'
22 | void *memset(void *s, int c, size_t n);
| ^~~~~~
vim +250 include/linux/iommu-driver.h
fffe0dd50c02d1 Jason Gunthorpe 2023-11-23 209
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 210 #define __iommu_first(a, b) \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 211 ({ \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 212 struct iommu_device *a_dev = a; \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 213 a_dev != ERR_PTR(-ENODEV) ? a_dev : (b); \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 214 })
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 215
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 216 #if IS_ENABLED(CONFIG_ACPI_VIOT)
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 217 struct iommu_device *
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 218 __iommu_viot_get_single_iommu(struct iommu_probe_info *pinf,
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 219 const struct iommu_ops *ops);
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 220 #else
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 221 static inline struct iommu_device *
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 222 __iommu_viot_get_single_iommu(struct iommu_probe_info *pinf,
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 223 const struct iommu_ops *ops)
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 224 {
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 225 return ERR_PTR(-ENODEV);
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 226 }
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 227 #endif
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 228 #define iommu_viot_get_single_iommu(pinf, ops, drv_struct, member) \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 229 container_of_err( \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 230 __iommu_first(__iommu_viot_get_single_iommu(pinf, ops), \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 231 __iommu_of_get_single_iommu(pinf, ops, -1)), \
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 232 drv_struct, member)
8c0cb0c6f13792 Jason Gunthorpe 2023-11-23 233
eb6348b72e7452 Jason Gunthorpe 2023-11-24 234 #if IS_ENABLED(CONFIG_ACPI_IORT)
eb6348b72e7452 Jason Gunthorpe 2023-11-24 235 struct iommu_device *
eb6348b72e7452 Jason Gunthorpe 2023-11-24 236 __iommu_iort_get_single_iommu(struct iommu_probe_info *pinf,
eb6348b72e7452 Jason Gunthorpe 2023-11-24 237 const struct iommu_ops *ops,
eb6348b72e7452 Jason Gunthorpe 2023-11-24 238 struct iort_params *params);
eb6348b72e7452 Jason Gunthorpe 2023-11-24 239 #else
eb6348b72e7452 Jason Gunthorpe 2023-11-24 240 static inline struct iommu_device *
eb6348b72e7452 Jason Gunthorpe 2023-11-24 241 __iommu_iort_get_single_iommu(struct iommu_probe_info *pinf,
eb6348b72e7452 Jason Gunthorpe 2023-11-24 242 const struct iommu_ops *ops,
eb6348b72e7452 Jason Gunthorpe 2023-11-24 243 struct iort_params *params)
eb6348b72e7452 Jason Gunthorpe 2023-11-24 244 {
eb6348b72e7452 Jason Gunthorpe 2023-11-24 245 return ERR_PTR(-ENODEV);
eb6348b72e7452 Jason Gunthorpe 2023-11-24 246 }
eb6348b72e7452 Jason Gunthorpe 2023-11-24 247 #endif
eb6348b72e7452 Jason Gunthorpe 2023-11-24 248 #define iommu_iort_get_single_iommu(pinf, ops, params, drv_struct, member) \
eb6348b72e7452 Jason Gunthorpe 2023-11-24 249 ({ \
eb6348b72e7452 Jason Gunthorpe 2023-11-24 @250 memset(params, 0, sizeof(*(params))); \
:::::: The code at line 250 was first introduced by commit
:::::: eb6348b72e74523d94a16048f46743207c995a5e iommu/iort: Add iommu_iort_get_single_iommu()
:::::: TO: Jason Gunthorpe <jgg@nvidia.com>
:::::: CC: Jason Gunthorpe <jgg@nvidia.com>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2023-11-30 11:53 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202311301910.MVTzrEVT-lkp@intel.com \
--to=lkp@intel.com \
--cc=jgg@nvidia.com \
--cc=oe-kbuild-all@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.