Content-Type: multipart/mixed; boundary="===============3681704398421786329==" MIME-Version: 1.0 From: Julia Lawall To: kbuild-all@lists.01.org Subject: [android-goldfish:android-5.4 2/9] drivers/iommu/iova.c:370:1-3: WARNING: possible condition with no effect (if == else) (fwd) Date: Thu, 05 Mar 2020 07:43:10 +0100 Message-ID: List-Id: --===============3681704398421786329== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable The then and else branches of the if on line 370 are the same. The code also violates the Linux kernel coding style, due to the braces around the branches. julia ---------- Forwarded message ---------- Date: Thu, 5 Mar 2020 10:08:08 +0800 From: kbuild test robot To: kbuild(a)lists.01.org Cc: Julia Lawall Subject: [android-goldfish:android-5.4 2/9] drivers/iommu/iova.c:370:1-3: WARNING: possible condition with no effect (if =3D=3D else) BCC: philip.li(a)intel.com tree: https://android.googlesource.com/kernel/goldfish android-5.4 head: dfa8232926a223af2cca7e528fcb0aee17d19c92 commit: 5e25537af702fdc66c123f3d563b7352bbf10c83 [2/9] FROMLIST: iommu/iova= : Add a best-fit algorithm :::::: branch date: :::::: commit date: 9 hours ago If you fix the issue, kindly add following tag Reported-by: kbuild test robot Reported-by: Julia Lawall >> drivers/iommu/iova.c:370:1-3: WARNING: possible condition with no effect= (if =3D=3D else) git remote add android-goldfish https://android.googlesource.com/kernel/gol= dfish git remote update android-goldfish git checkout 5e25537af702fdc66c123f3d563b7352bbf10c83 vim +370 drivers/iommu/iova.c ae1ff3d62390594 drivers/iommu/iova.c Sakari Ailus 2015-07-13 346 f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 347 = /** f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 348 = * alloc_iova - allocates an iova 07db04098d1e2f2 drivers/iommu/iova.c Masanari Iida 2012-07-22 349 = * @iovad: - iova domain in question 07db04098d1e2f2 drivers/iommu/iova.c Masanari Iida 2012-07-22 350 = * @size: - size of page frames to allocate 07db04098d1e2f2 drivers/iommu/iova.c Masanari Iida 2012-07-22 351 = * @limit_pfn: - max limit address 07db04098d1e2f2 drivers/iommu/iova.c Masanari Iida 2012-07-22 352 = * @size_aligned: - set if size_aligned address range is required 1b72250076dde42 drivers/iommu/iova.c Robin Murphy 2015-01-12 353 = * This function allocates an iova in the range iovad->start_pfn to limit_= pfn, 1b72250076dde42 drivers/iommu/iova.c Robin Murphy 2015-01-12 354 = * searching top-down from limit_pfn to iovad->start_pfn. If the size_alig= ned f76aec76ec7f688 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 355 = * flag is set then the allocated address iova->pfn_lo will be naturally f76aec76ec7f688 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 356 = * aligned on roundup_power_of_two(size). f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 357 = */ f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 358 = struct iova * f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 359 = alloc_iova(struct iova_domain *iovad, unsigned long size, f76aec76ec7f688 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 360 = unsigned long limit_pfn, f76aec76ec7f688 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 361 = bool size_aligned) f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 362 = { f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 363 = struct iova *new_iova; f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 364 = int ret; f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 365 f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 366 = new_iova =3D alloc_iova_mem(); f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 367 = if (!new_iova) f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 368 = return NULL; f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 369 5e25537af702fdc drivers/iommu/iova.c Liam Mark 2020-02-26 @370 = if (iovad->best_fit) { 5e25537af702fdc drivers/iommu/iova.c Liam Mark 2020-02-26 371 = ret =3D __alloc_and_insert_iova_range(iovad, size, 5e25537af702fdc drivers/iommu/iova.c Liam Mark 2020-02-26 372 = limit_pfn + 1, new_iova, size_aligned); 5e25537af702fdc drivers/iommu/iova.c Liam Mark 2020-02-26 373 = } else { 757c370f036e1f9 drivers/iommu/iova.c Robin Murphy 2017-05-16 374 = ret =3D __alloc_and_insert_iova_range(iovad, size, limit_pfn + 1, ddf02886cbe665d drivers/pci/iova.c mark gross 2008-03-04 375 = new_iova, size_aligned); 5e25537af702fdc drivers/iommu/iova.c Liam Mark 2020-02-26 376 = } f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 377 ddf02886cbe665d drivers/pci/iova.c mark gross 2008-03-04 378 = if (ret) { f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 379 = free_iova_mem(new_iova); f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 380 = return NULL; f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 381 = } f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 382 f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 383 = return new_iova; f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 384 = } 9b41760b03816b3 drivers/iommu/iova.c Sakari Ailus 2015-07-13 385 = EXPORT_SYMBOL_GPL(alloc_iova); f8de50eb6b08557 drivers/pci/iova.c Keshavamurthy, Anil S 2007-10-21 386 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org --===============3681704398421786329==--