All of lore.kernel.org
 help / color / mirror / Atom feed
* [linux-next:master 4732/5057] include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared; did you mean 'S_DT_SHIFT'?
@ 2019-10-17  7:44 kbuild test robot
  2019-10-17 13:45 ` Pierre-Louis Bossart
  0 siblings, 1 reply; 4+ messages in thread
From: kbuild test robot @ 2019-10-17  7:44 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2168 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   3ef845da3c3b180ddd386e228ac3228d84a522d3
commit: df72b71921195015e3a8ce772a9ad79442bf0de3 [4732/5057] soundwire: intel: add missing headers for cross-compilation
config: i386-randconfig-f004-201941 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
reproduce:
        git checkout df72b71921195015e3a8ce772a9ad79442bf0de3
        # save the attached .config to linux build tree
        make ARCH=i386 

If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>

All errors (new ones prefixed by >>):

   In file included from drivers//soundwire/intel_init.c:12:0:
   include/linux/iomap.h: In function 'iomap_sector':
>> include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared (first use in this function); did you mean 'S_DT_SHIFT'?
     return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
                                                   ^~~~~~~~~~~~
                                                   S_DT_SHIFT
   include/linux/iomap.h:76:48: note: each undeclared identifier is reported only once for each function it appears in

vim +76 include/linux/iomap.h

63899c6f8851c3 Christoph Hellwig 2018-06-19  72  
db074436f42196 Darrick J. Wong   2019-07-15  73  static inline sector_t
db074436f42196 Darrick J. Wong   2019-07-15  74  iomap_sector(struct iomap *iomap, loff_t pos)
db074436f42196 Darrick J. Wong   2019-07-15  75  {
db074436f42196 Darrick J. Wong   2019-07-15 @76  	return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
db074436f42196 Darrick J. Wong   2019-07-15  77  }
db074436f42196 Darrick J. Wong   2019-07-15  78  

:::::: The code at line 76 was first introduced by commit
:::::: db074436f421967f4f30cfbb6fbc2a728f3e62b3 iomap: move the direct IO code into a separate file

:::::: TO: Darrick J. Wong <darrick.wong@oracle.com>
:::::: CC: Darrick J. Wong <darrick.wong@oracle.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 38804 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 4732/5057] include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared; did you mean 'S_DT_SHIFT'?
  2019-10-17  7:44 [linux-next:master 4732/5057] include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared; did you mean 'S_DT_SHIFT'? kbuild test robot
@ 2019-10-17 13:45 ` Pierre-Louis Bossart
  2019-10-22  4:37   ` Vinod Koul
  0 siblings, 1 reply; 4+ messages in thread
From: Pierre-Louis Bossart @ 2019-10-17 13:45 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 2569 bytes --]



On 10/17/19 2:44 AM, kbuild test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head:   3ef845da3c3b180ddd386e228ac3228d84a522d3
> commit: df72b71921195015e3a8ce772a9ad79442bf0de3 [4732/5057] soundwire: intel: add missing headers for cross-compilation
> config: i386-randconfig-f004-201941 (attached as .config)
> compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
> reproduce:
>          git checkout df72b71921195015e3a8ce772a9ad79442bf0de3
>          # save the attached .config to linux build tree
>          make ARCH=i386
> 
> If you fix the issue, kindly add following tag
> Reported-by: kbuild test robot <lkp@intel.com>
> 
> All errors (new ones prefixed by >>):
> 
>     In file included from drivers//soundwire/intel_init.c:12:0:
>     include/linux/iomap.h: In function 'iomap_sector':
>>> include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared (first use in this function); did you mean 'S_DT_SHIFT'?
>       return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
>                                                     ^~~~~~~~~~~~
>                                                     S_DT_SHIFT

SECTOR_SHIFT is defined if CONFIG_BLOCK is selected. It isn't selected 
in this config, so that's probably a dependency that needs to be captured.

Alternatively, maybe we should use readl instead, not sure why ioread32 
was used in the first place?


>     include/linux/iomap.h:76:48: note: each undeclared identifier is reported only once for each function it appears in
> 
> vim +76 include/linux/iomap.h
> 
> 63899c6f8851c3 Christoph Hellwig 2018-06-19  72
> db074436f42196 Darrick J. Wong   2019-07-15  73  static inline sector_t
> db074436f42196 Darrick J. Wong   2019-07-15  74  iomap_sector(struct iomap *iomap, loff_t pos)
> db074436f42196 Darrick J. Wong   2019-07-15  75  {
> db074436f42196 Darrick J. Wong   2019-07-15 @76  	return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
> db074436f42196 Darrick J. Wong   2019-07-15  77  }
> db074436f42196 Darrick J. Wong   2019-07-15  78
> 
> :::::: The code at line 76 was first introduced by commit
> :::::: db074436f421967f4f30cfbb6fbc2a728f3e62b3 iomap: move the direct IO code into a separate file
> 
> :::::: TO: Darrick J. Wong <darrick.wong@oracle.com>
> :::::: CC: Darrick J. Wong <darrick.wong@oracle.com>
> 
> ---
> 0-DAY kernel test infrastructure                Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all                   Intel Corporation
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 4732/5057] include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared; did you mean 'S_DT_SHIFT'?
  2019-10-17 13:45 ` Pierre-Louis Bossart
@ 2019-10-22  4:37   ` Vinod Koul
  2019-10-22 13:02     ` Pierre-Louis Bossart
  0 siblings, 1 reply; 4+ messages in thread
From: Vinod Koul @ 2019-10-22  4:37 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3141 bytes --]

On 17-10-19, 08:45, Pierre-Louis Bossart wrote:
> 
> 
> On 10/17/19 2:44 AM, kbuild test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   3ef845da3c3b180ddd386e228ac3228d84a522d3
> > commit: df72b71921195015e3a8ce772a9ad79442bf0de3 [4732/5057] soundwire: intel: add missing headers for cross-compilation
> > config: i386-randconfig-f004-201941 (attached as .config)
> > compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
> > reproduce:
> >          git checkout df72b71921195015e3a8ce772a9ad79442bf0de3
> >          # save the attached .config to linux build tree
> >          make ARCH=i386
> > 
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@intel.com>
> > 
> > All errors (new ones prefixed by >>):
> > 
> >     In file included from drivers//soundwire/intel_init.c:12:0:
> >     include/linux/iomap.h: In function 'iomap_sector':
> > > > include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared (first use in this function); did you mean 'S_DT_SHIFT'?
> >       return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
> >                                                     ^~~~~~~~~~~~
> >                                                     S_DT_SHIFT
> 
> SECTOR_SHIFT is defined if CONFIG_BLOCK is selected. It isn't selected in
> this config, so that's probably a dependency that needs to be captured.
> 
> Alternatively, maybe we should use readl instead, not sure why ioread32 was
> used in the first place?

Coz we are using 32 bit writes which are guaranteed to be 32bits
irrespective of the arch used.

Relooking at the change, something does not seem right. If you care
about ioread32 etc why are you adding iomap.h in intel_init.c and io.h
intel.c?

That does not look correct to me. We should include io.h in both the
places which is the right header which defines the ioread and friends
and includes asm/io.h

I did a quick cross compile on couple of arch and this seemed fine.

-->8---

From: Vinod Koul <vkoul@kernel.org>
Date: Tue, 22 Oct 2019 10:03:08 +0530
Subject: [PATCH] soundwire: intel: use correct header for io calls

Commit df72b7192119 ("soundwire: intel: add missing headers for
cross-compilation") tried to fix cross compilation but erroneously used
wrong header in one of the file. Fix it by using correct io.h header.

Reported-by: kbuild test robot <lkp@intel.com>
Fixes: df72b7192119 ("soundwire: intel: add missing headers for cross-compilation")
Signed-off-by: Vinod Koul <vkoul@kernel.org>
---
 drivers/soundwire/intel_init.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
index d488c44fcbae..2a2b4d8df462 100644
--- a/drivers/soundwire/intel_init.c
+++ b/drivers/soundwire/intel_init.c
@@ -9,7 +9,7 @@
 
 #include <linux/acpi.h>
 #include <linux/export.h>
-#include <linux/iomap.h>
+#include <linux/io.h>
 #include <linux/module.h>
 #include <linux/platform_device.h>
 #include <linux/soundwire/sdw_intel.h>
-- 
2.20.1

-- 
~Vinod

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [linux-next:master 4732/5057] include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared; did you mean 'S_DT_SHIFT'?
  2019-10-22  4:37   ` Vinod Koul
@ 2019-10-22 13:02     ` Pierre-Louis Bossart
  0 siblings, 0 replies; 4+ messages in thread
From: Pierre-Louis Bossart @ 2019-10-22 13:02 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 3622 bytes --]

On 10/21/19 11:37 PM, Vinod Koul wrote:
> On 17-10-19, 08:45, Pierre-Louis Bossart wrote:
>>
>>
>> On 10/17/19 2:44 AM, kbuild test robot wrote:
>>> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
>>> head:   3ef845da3c3b180ddd386e228ac3228d84a522d3
>>> commit: df72b71921195015e3a8ce772a9ad79442bf0de3 [4732/5057] soundwire: intel: add missing headers for cross-compilation
>>> config: i386-randconfig-f004-201941 (attached as .config)
>>> compiler: gcc-7 (Debian 7.4.0-13) 7.4.0
>>> reproduce:
>>>           git checkout df72b71921195015e3a8ce772a9ad79442bf0de3
>>>           # save the attached .config to linux build tree
>>>           make ARCH=i386
>>>
>>> If you fix the issue, kindly add following tag
>>> Reported-by: kbuild test robot <lkp@intel.com>
>>>
>>> All errors (new ones prefixed by >>):
>>>
>>>      In file included from drivers//soundwire/intel_init.c:12:0:
>>>      include/linux/iomap.h: In function 'iomap_sector':
>>>>> include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared (first use in this function); did you mean 'S_DT_SHIFT'?
>>>        return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT;
>>>                                                      ^~~~~~~~~~~~
>>>                                                      S_DT_SHIFT
>>
>> SECTOR_SHIFT is defined if CONFIG_BLOCK is selected. It isn't selected in
>> this config, so that's probably a dependency that needs to be captured.
>>
>> Alternatively, maybe we should use readl instead, not sure why ioread32 was
>> used in the first place?
> 
> Coz we are using 32 bit writes which are guaranteed to be 32bits
> irrespective of the arch used.

what's wrong with readl/writel? and why do we care anyways, this is used 
in intel_init() so all we care about is that it works on intel hardware?

> 
> Relooking at the change, something does not seem right. If you care
> about ioread32 etc why are you adding iomap.h in intel_init.c and io.h
> intel.c?
> 
> That does not look correct to me. We should include io.h in both the
> places which is the right header which defines the ioread and friends
> and includes asm/io.h
> 
> I did a quick cross compile on couple of arch and this seemed fine.

ok. I can't recall what I did, this was a month ago and the kbuild bot 
complained without iomap.h
If you want to apply fine with me, that's small potatoes compared to the 
rest I am working on.

> 
> -->8---
> 
> From: Vinod Koul <vkoul@kernel.org>
> Date: Tue, 22 Oct 2019 10:03:08 +0530
> Subject: [PATCH] soundwire: intel: use correct header for io calls
> 
> Commit df72b7192119 ("soundwire: intel: add missing headers for
> cross-compilation") tried to fix cross compilation but erroneously used
> wrong header in one of the file. Fix it by using correct io.h header.
> 
> Reported-by: kbuild test robot <lkp@intel.com>
> Fixes: df72b7192119 ("soundwire: intel: add missing headers for cross-compilation")
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
>   drivers/soundwire/intel_init.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/soundwire/intel_init.c b/drivers/soundwire/intel_init.c
> index d488c44fcbae..2a2b4d8df462 100644
> --- a/drivers/soundwire/intel_init.c
> +++ b/drivers/soundwire/intel_init.c
> @@ -9,7 +9,7 @@
>   
>   #include <linux/acpi.h>
>   #include <linux/export.h>
> -#include <linux/iomap.h>
> +#include <linux/io.h>
>   #include <linux/module.h>
>   #include <linux/platform_device.h>
>   #include <linux/soundwire/sdw_intel.h>
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-22 13:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17  7:44 [linux-next:master 4732/5057] include/linux/iomap.h:76:48: error: 'SECTOR_SHIFT' undeclared; did you mean 'S_DT_SHIFT'? kbuild test robot
2019-10-17 13:45 ` Pierre-Louis Bossart
2019-10-22  4:37   ` Vinod Koul
2019-10-22 13:02     ` Pierre-Louis Bossart

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.