* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Jarkko Nikula @ 2017-12-20 8:34 UTC (permalink / raw)
To: Joe Perches
Cc: Jani Nikula, Joonas Lahtinen, Rodrigo Vivi, Cezary Jackiewicz,
Darren Hart, Andy Shevchenko, Sebastian Ott, Peter Oberparleiter,
James Smart, Dick Kennedy, Zhang Rui, Eduardo Valentin,
Greg Kroah-Hartman, Mathias Nyman, Felipe Balbi,
Luis R. Rodriguez, Peter Ujfalusi, Martin Schwidefsky
In-Reply-To: <cd38f14f06e1f447b3159ffe8c69c0df8241bb6e.1513706701.git.joe@perches.com>
On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote:
> Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
>
...
> diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> index 7a54e3083203..79d4dc785e5c 100644
> --- a/sound/soc/omap/mcbsp.c
> +++ b/sound/soc/omap/mcbsp.c
> @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *dev,
> return size;
> }
>
> -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store);
> +static DEVICE_ATTR_RW(dma_op_mode);
>
While I can ack this part here if it helps generic cleanup effort I
don't understart would it improve code readability in general? Mode 644
is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to go
through all of these files in order to see what does it mean:
DEVICE_ATTR_RW: include/linux/device.h
__ATTR_RW: include/linux/sysfs.h
S_IWUSR: include/uapi/linux/stat.h
S_IRUGO: include/linux/stat.h
Jarkko Nikula <jarkko.nikula@bitmer.com>
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Joe Perches @ 2017-12-20 9:24 UTC (permalink / raw)
To: Jarkko Nikula
Cc: linux-fbdev, David Airlie, Joonas Lahtinen, Heiko Carstens,
alsa-devel, dri-devel, Jaroslav Kysela, Peter Ujfalusi,
linux-s390, linux-omap, James E.J. Bottomley, linux-scsi,
Takashi Iwai, Sebastian Ott, James Smart, Cezary Jackiewicz,
linux-serial, Jiri Slaby, Darren Hart, Zhang Rui, Dick Kennedy,
Mathias Nyman, Bartlomiej Zolnierkiewicz,
Peter Oberparleiter <oberp>
In-Reply-To: <20171220083403.GA27231@bitmer.com>
On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote:
> On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote:
> > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
[]
> > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
[]
> > @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *dev,
> > return size;
> > }
> >
> > -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store);
> > +static DEVICE_ATTR_RW(dma_op_mode);
> >
>
> While I can ack this part here if it helps generic cleanup effort I
> don't understart would it improve code readability in general? Mode 644
> is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to go
> through all of these files in order to see what does it mean:
Are you suggesting that device.h (as that is where
DEVICE_ATTR and the other DEVICE_ATTR_<FOO> variants
are #defined) should have better comments for the
_<FOO> variants?
> DEVICE_ATTR_RW: include/linux/device.h
> __ATTR_RW: include/linux/sysfs.h
> S_IWUSR: include/uapi/linux/stat.h
> S_IRUGO: include/linux/stat.h
btw: patch 1/4 of the series does remove the uses of
S_<PERMS> from these macros in sysfs.h and converts
them to simple octal instead.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Greg Kroah-Hartman @ 2017-12-20 9:32 UTC (permalink / raw)
To: Joe Perches
Cc: Jarkko Nikula, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Cezary Jackiewicz, Darren Hart, Andy Shevchenko, Sebastian Ott,
Peter Oberparleiter, James Smart, Dick Kennedy, Zhang Rui,
Eduardo Valentin, Mathias Nyman, Felipe Balbi, Luis R. Rodriguez,
Peter Ujfalusi, Martin Schwidefsky, Heiko
In-Reply-To: <1513761884.1234.83.camel@perches.com>
On Wed, Dec 20, 2017 at 01:24:44AM -0800, Joe Perches wrote:
> On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote:
> > On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote:
> > > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
> []
> > > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> []
> > > @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *dev,
> > > return size;
> > > }
> > >
> > > -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store);
> > > +static DEVICE_ATTR_RW(dma_op_mode);
> > >
> >
> > While I can ack this part here if it helps generic cleanup effort I
> > don't understart would it improve code readability in general? Mode 644
> > is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to go
> > through all of these files in order to see what does it mean:
Yeah, 644 is "clear", but _RW() is even more clear. Ideally I want to
get rid of all of the "non-standard" users that set random modes of
sysfs files, as we get it wrong too many times. Using the "defaults" is
much better.
> Are you suggesting that device.h (as that is where
> DEVICE_ATTR and the other DEVICE_ATTR_<FOO> variants
> are #defined) should have better comments for the
> _<FOO> variants?
>
> > DEVICE_ATTR_RW: include/linux/device.h
> > __ATTR_RW: include/linux/sysfs.h
> > S_IWUSR: include/uapi/linux/stat.h
> > S_IRUGO: include/linux/stat.h
>
> btw: patch 1/4 of the series does remove the uses of
> S_<PERMS> from these macros in sysfs.h and converts
> them to simple octal instead.
Why you didn't send that patch to the sysfs maintainer is a bit odd... :)
I should be taking this whole series through my tree. Joe, thanks for
doing this in an automated way, I've been wanting to see this done for a
long time.
thanks,
greg k-h
^ permalink raw reply
* Re: [-next PATCH 0/4] sysfs and DEVICE_ATTR_<foo>
From: Felipe Balbi @ 2017-12-20 9:46 UTC (permalink / raw)
To: Joe Perches, linux-arm-kernel, linux-acpi, openipmi-developer,
intel-gfx, linuxppc-dev, netdev, linux-nvme, platform-driver-x86,
linux-s390, esc.storagedev, linux-scsi, linux-pm, linux-serial,
linux-usb, linux-kernel, alsa-devel, linux-omap
Cc: devel, linux-fbdev, linux-sh, dri-devel, linux-input, linux-media
In-Reply-To: <cover.1513706701.git.joe@perches.com>
Hi,
Joe Perches <joe@perches.com> writes:
> drivers/usb/phy/phy-tahvo.c | 2 +-
Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com>
--
balbi
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Joe Perches @ 2017-12-20 9:54 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-fbdev, David Airlie, Heiko Carstens, alsa-devel, dri-devel,
Jaroslav Kysela, Peter Ujfalusi, linux-s390, linux-omap,
James E.J. Bottomley, linux-scsi, Takashi Iwai, Sebastian Ott,
James Smart, Cezary Jackiewicz, linux-serial, Jiri Slaby,
Darren Hart, Zhang Rui, Dick Kennedy, Mathias Nyman,
Bartlomiej Zolnierkiewicz, Peter Oberparleiter, intel-gfx
In-Reply-To: <20171220093211.GA16177@kroah.com>
On Wed, 2017-12-20 at 10:32 +0100, Greg Kroah-Hartman wrote:
> On Wed, Dec 20, 2017 at 01:24:44AM -0800, Joe Perches wrote:
> > On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote:
> > > On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote:
> > > > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
> >
> > []
> > > > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> >
> > []
> > > > @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *dev,
> > > > return size;
> > > > }
> > > >
> > > > -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store);
> > > > +static DEVICE_ATTR_RW(dma_op_mode);
> > > >
> > >
> > > While I can ack this part here if it helps generic cleanup effort I
> > > don't understart would it improve code readability in general? Mode 644
> > > is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to go
> > > through all of these files in order to see what does it mean:
>
> Yeah, 644 is "clear", but _RW() is even more clear. Ideally I want to
> get rid of all of the "non-standard" users that set random modes of
> sysfs files, as we get it wrong too many times. Using the "defaults" is
> much better.
>
> > Are you suggesting that device.h (as that is where
> > DEVICE_ATTR and the other DEVICE_ATTR_<FOO> variants
> > are #defined) should have better comments for the
> > _<FOO> variants?
> >
> > > DEVICE_ATTR_RW: include/linux/device.h
> > > __ATTR_RW: include/linux/sysfs.h
> > > S_IWUSR: include/uapi/linux/stat.h
> > > S_IRUGO: include/linux/stat.h
> >
> > btw: patch 1/4 of the series does remove the uses of
> > S_<PERMS> from these macros in sysfs.h and converts
> > them to simple octal instead.
>
> Why you didn't send that patch to the sysfs maintainer is a bit odd... :)
So here's an opportunity for you:
The sysfs maintainer hasn't added include/linux/sysfs.h to
the list of maintained files...
DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
S: Supported
F: Documentation/kobject.txt
F: drivers/base/
F: fs/debugfs/
F: fs/sysfs/
F: include/linux/debugfs.h
F: include/linux/kobj*
F: lib/kobj*
> I should be taking this whole series through my tree. Joe, thanks for
> doing this in an automated way, I've been wanting to see this done for a
> long time.
btw: there are many uses of a reversed declaration style of DEVICE_ATTR
Here's another thing that could be done for more DEVICE_ATTR_<FOO> uses.
===
Some DEVICE_ATTR definitions use a reversed static function form from
the typical. Convert them to use the more common macro form so it is
easier to grep for the style.
i.e.:
static ssize_t show_<foo>(...)
and
static ssize_t store_<foo>(...)
where the static function names in the DEVICE_ATTR_RW macro are reversed
static ssize_t <foo>_show(...)
and
static ssize_t <foo>_store(...)
Done with perl script
$ cat dev_attr_rw_backwards.perl
local $/;
while (<>) {
my $file = $_;
while ($file =~ m/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,/g) {
my $var = $1;
if ($file =~ s/\bDEVICE_ATTR\s*\(\s*${var}\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S
$file =~ s/\bshow_${var}\b/${var}_show/g;
$file =~ s/\bstore_${var}\b/${var}_store/g;
}
}
print $file;
}
$ git grep --name-only -w DEVICE_ATTR | \
xargs perl -i dev_attr_rw_backwards.perl
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: kbuild test robot @ 2017-12-20 9:54 UTC (permalink / raw)
Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
dhowells, will.deacon, daniel.lezcano, linux-serial,
geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
pombredanne, green.hu
In-Reply-To: <95be78502aa406f106ecbe87e751a45333883b1f.1513577007.git.green.hu@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 3649 bytes --]
Hi Greentime,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/timers/core]
[cannot apply to linus/master v4.15-rc4 next-20171220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
config: sparc64-allyesconfig (attached as .config)
compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc64
All warnings (new ones prefixed by >>):
drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_set_page':
>> drivers/net/ethernet/faraday/ftmac100.c:288:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
rxdes->rxdes3 = (unsigned int)page;
^
drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_get_page':
>> drivers/net/ethernet/faraday/ftmac100.c:293:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (struct page *)rxdes->rxdes3;
^
drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_txdes_set_skb':
drivers/net/ethernet/faraday/ftmac100.c:548:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
txdes->txdes3 = (unsigned int)skb;
^
drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_txdes_get_skb':
drivers/net/ethernet/faraday/ftmac100.c:553:9: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
return (struct sk_buff *)txdes->txdes3;
^
vim +288 drivers/net/ethernet/faraday/ftmac100.c
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 281
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 282 /*
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 283 * rxdes3 is not used by hardware. We use it to keep track of page.
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 284 * Since hardware does not touch it, we can skip cpu_to_le32()/le32_to_cpu().
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 285 */
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 286 static void ftmac100_rxdes_set_page(struct ftmac100_rxdes *rxdes, struct page *page)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 287 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @288 rxdes->rxdes3 = (unsigned int)page;
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 289 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 290
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 291 static struct page *ftmac100_rxdes_get_page(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 292 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @293 return (struct page *)rxdes->rxdes3;
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 294 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 295
:::::: The code at line 288 was first introduced by commit
:::::: 8d77c036b57cf813d838f859e11b6a188acdb1fb net: add Faraday FTMAC100 10/100 Ethernet driver
:::::: TO: Po-Yu Chuang <ratbert@faraday-tech.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
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: 52104 bytes --]
^ permalink raw reply
* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: Geert Uytterhoeven @ 2017-12-20 9:58 UTC (permalink / raw)
To: kbuild test robot
Cc: Greentime Hu, kbuild-all-JC7UmRfGjtg, Greentime,
Linux Kernel Mailing List, Arnd Bergmann, Linux-Arch,
Thomas Gleixner, Jason Cooper, Marc Zyngier, Rob Herring,
netdev-u79uwXL29TY76Z2rM5mHXA, Vincent Chen,
devicetree-u79uwXL29TY76Z2rM5mHXA, Al Viro, David Howells,
Will Deacon, Daniel Lezcano, linux-serial-u79uwXL29TY76Z2rM5mHXA,
Linus Walleij, Mark Rutland, Greg KH,
ren_guo-Y+KPrCd2zL4AvxtiuMwx3w
In-Reply-To: <201712201744.gsBDa4yK%fengguang.wu-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org>
On Wed, Dec 20, 2017 at 10:54 AM, kbuild test robot <lkp-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
> I love your patch! Perhaps something to improve:
>
> [auto build test WARNING on tip/timers/core]
> [cannot apply to linus/master v4.15-rc4 next-20171220]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
> config: sparc64-allyesconfig (attached as .config)
> compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=sparc64
>
> All warnings (new ones prefixed by >>):
>
> drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_set_page':
>>> drivers/net/ethernet/faraday/ftmac100.c:288:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
> rxdes->rxdes3 = (unsigned int)page;
> ^
The proper way to casts pointer to integers is to cast to "uintptr_t".
However, the address is stored in a 32-bit descriptor, which means it can
not work on 64-bit platforms.
Please make the driver depend on "!64BIT || BROKEN"
Cfr. commit 15bfe05c8d6386f1 ("net: ethernet: xilinx: Mark XILINX_LL_TEMAC
broken on 64-bit")
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert-Td1EMuHUCqxL1ZNQvxDV9g@public.gmane.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Greg Kroah-Hartman @ 2017-12-20 9:59 UTC (permalink / raw)
To: Joe Perches
Cc: linux-fbdev, David Airlie, Heiko Carstens, alsa-devel, dri-devel,
Jaroslav Kysela, Peter Ujfalusi, linux-s390, linux-omap,
James E.J. Bottomley, linux-scsi, Takashi Iwai, Sebastian Ott,
James Smart, Cezary Jackiewicz, linux-serial, Jiri Slaby,
Darren Hart, Zhang Rui, Dick Kennedy, Mathias Nyman,
Bartlomiej Zolnierkiewicz, Peter Oberparleiter, intel-gfx
In-Reply-To: <1513763681.1234.101.camel@perches.com>
On Wed, Dec 20, 2017 at 01:54:41AM -0800, Joe Perches wrote:
> On Wed, 2017-12-20 at 10:32 +0100, Greg Kroah-Hartman wrote:
> > On Wed, Dec 20, 2017 at 01:24:44AM -0800, Joe Perches wrote:
> > > On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote:
> > > > On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote:
> > > > > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
> > >
> > > []
> > > > > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> > >
> > > []
> > > > > @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *dev,
> > > > > return size;
> > > > > }
> > > > >
> > > > > -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store);
> > > > > +static DEVICE_ATTR_RW(dma_op_mode);
> > > > >
> > > >
> > > > While I can ack this part here if it helps generic cleanup effort I
> > > > don't understart would it improve code readability in general? Mode 644
> > > > is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to go
> > > > through all of these files in order to see what does it mean:
> >
> > Yeah, 644 is "clear", but _RW() is even more clear. Ideally I want to
> > get rid of all of the "non-standard" users that set random modes of
> > sysfs files, as we get it wrong too many times. Using the "defaults" is
> > much better.
> >
> > > Are you suggesting that device.h (as that is where
> > > DEVICE_ATTR and the other DEVICE_ATTR_<FOO> variants
> > > are #defined) should have better comments for the
> > > _<FOO> variants?
> > >
> > > > DEVICE_ATTR_RW: include/linux/device.h
> > > > __ATTR_RW: include/linux/sysfs.h
> > > > S_IWUSR: include/uapi/linux/stat.h
> > > > S_IRUGO: include/linux/stat.h
> > >
> > > btw: patch 1/4 of the series does remove the uses of
> > > S_<PERMS> from these macros in sysfs.h and converts
> > > them to simple octal instead.
> >
> > Why you didn't send that patch to the sysfs maintainer is a bit odd... :)
>
> So here's an opportunity for you:
>
> The sysfs maintainer hasn't added include/linux/sysfs.h to
> the list of maintained files...
>
> DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
> M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
> S: Supported
> F: Documentation/kobject.txt
> F: drivers/base/
> F: fs/debugfs/
> F: fs/sysfs/
> F: include/linux/debugfs.h
> F: include/linux/kobj*
> F: lib/kobj*
Heh, good point, but using get_maintainer.pl does put me at the top of
the list that you should be cc:ing:
$ ./scripts/get_maintainer.pl --file include/linux/sysfs.h
Greg Kroah-Hartman <gregkh@linuxfoundation.org> (commit_signer:3/3=100%,authored:2/3=67%,added_lines:7/8=88%)
Kate Stewart <kstewart@linuxfoundation.org> (commit_signer:1/3=33%)
Thomas Gleixner <tglx@linutronix.de> (commit_signer:1/3=33%)
Philippe Ombredanne <pombredanne@nexb.com> (commit_signer:1/3=33%)
Nick Desaulniers <nick.desaulniers@gmail.com> (commit_signer:1/3=33%,authored:1/3=33%,added_lines:1/8=12%,removed_lines:1/1=100%)
linux-kernel@vger.kernel.org (open list)
Anyway, I'll go add sysfs.h to the list, thanks for pointing it out.
> > I should be taking this whole series through my tree. Joe, thanks for
> > doing this in an automated way, I've been wanting to see this done for a
> > long time.
>
> btw: there are many uses of a reversed declaration style of DEVICE_ATTR
>
> Here's another thing that could be done for more DEVICE_ATTR_<FOO> uses.
>
> ===
>
> Some DEVICE_ATTR definitions use a reversed static function form from
> the typical. Convert them to use the more common macro form so it is
> easier to grep for the style.
>
> i.e.:
> static ssize_t show_<foo>(...)
> and
> static ssize_t store_<foo>(...)
>
> where the static function names in the DEVICE_ATTR_RW macro are reversed
>
> static ssize_t <foo>_show(...)
> and
> static ssize_t <foo>_store(...)
>
> Done with perl script
>
> $ cat dev_attr_rw_backwards.perl
> local $/;
> while (<>) {
> my $file = $_;
> while ($file =~ m/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,/g) {
> my $var = $1;
> if ($file =~ s/\bDEVICE_ATTR\s*\(\s*${var}\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S
> $file =~ s/\bshow_${var}\b/${var}_show/g;
> $file =~ s/\bstore_${var}\b/${var}_store/g;
> }
> }
> print $file;
> }
>
> $ git grep --name-only -w DEVICE_ATTR | \
> xargs perl -i dev_attr_rw_backwards.perl
>
Ah, nice, I love perl :)
greg k-h
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* Re: [PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
From: kbuild test robot @ 2017-12-20 10:09 UTC (permalink / raw)
Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
dhowells, will.deacon, daniel.lezcano, linux-serial,
geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
pombredanne, green.hu, Vincent Chen
In-Reply-To: <d25ea659bc370a6bb24c4d42416f890a34051df1.1513577007.git.green.hu@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 22586 bytes --]
Hi Greentime,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/timers/core]
[also build test ERROR on v4.15-rc4 next-20171220]
[cannot apply to linus/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
config: sparc-defconfig (attached as .config)
compiler: sparc-linux-gcc (GCC) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=sparc
All error/warnings (new ones prefixed by >>):
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
void __iomem *ioremap(unsigned long offset, unsigned long size);
^~~~~~~
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
^~~~~~~
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
#define ioremap_nocache(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
include/asm-generic/io.h:865:0: note: this is the location of the previous definition
#define ioremap_nocache ioremap_nocache
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
#define ioremap_wc(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
include/asm-generic/io.h:881:0: note: this is the location of the previous definition
#define ioremap_wc ioremap_wc
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
#define ioremap_wt(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from arch/sparc/kernel/kernel.h:4,
from arch/sparc/kernel/traps_32.c:30:
include/asm-generic/io.h:889:0: note: this is the location of the previous definition
#define ioremap_wt ioremap_wt
cc1: all warnings being treated as errors
--
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
void __iomem *ioremap(unsigned long offset, unsigned long size);
^~~~~~~
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
^~~~~~~
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
#define ioremap_nocache(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
include/asm-generic/io.h:865:0: note: this is the location of the previous definition
#define ioremap_nocache ioremap_nocache
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
#define ioremap_wc(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
include/asm-generic/io.h:881:0: note: this is the location of the previous definition
#define ioremap_wc ioremap_wc
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
#define ioremap_wt(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
include/asm-generic/io.h:889:0: note: this is the location of the previous definition
#define ioremap_wt ioremap_wt
>> arch/sparc/kernel/ioport.c:124:15: error: conflicting types for 'ioremap'
void __iomem *ioremap(unsigned long offset, unsigned long size)
^~~~~~~
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
^~~~~~~
In file included from include/linux/linkage.h:6:0,
from include/linux/kernel.h:6,
from include/linux/list.h:8,
from include/linux/module.h:9,
from arch/sparc/kernel/ioport.c:28:
arch/sparc/kernel/ioport.c:131:15: error: conflicting types for 'ioremap'
EXPORT_SYMBOL(ioremap);
^
include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
extern typeof(sym) sym; \
^~~
>> arch/sparc/kernel/ioport.c:131:1: note: in expansion of macro 'EXPORT_SYMBOL'
EXPORT_SYMBOL(ioremap);
^~~~~~~~~~~~~
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc/kernel/ioport.c:36:
include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
^~~~~~~
cc1: all warnings being treated as errors
--
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
void __iomem *ioremap(unsigned long offset, unsigned long size);
^~~~~~~
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
^~~~~~~
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
#define ioremap_nocache(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
include/asm-generic/io.h:865:0: note: this is the location of the previous definition
#define ioremap_nocache ioremap_nocache
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
#define ioremap_wc(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
include/asm-generic/io.h:881:0: note: this is the location of the previous definition
#define ioremap_wc ioremap_wc
In file included from arch/sparc/include/asm/io.h:6:0,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
#define ioremap_wt(X,Y) ioremap((X),(Y))
In file included from arch/sparc/include/asm/io_32.h:13:0,
from arch/sparc/include/asm/io.h:6,
from include/linux/io.h:25,
from include/linux/irq.h:24,
from include/asm-generic/hardirq.h:12,
from arch/sparc/include/asm/hardirq_32.h:10,
from arch/sparc/include/asm/hardirq.h:6,
from include/linux/hardirq.h:8,
from include/linux/interrupt.h:12,
from include/linux/pci.h:31,
from arch/sparc//kernel/ioport.c:36:
include/asm-generic/io.h:889:0: note: this is the location of the previous definition
#define ioremap_wt ioremap_wt
arch/sparc//kernel/ioport.c:124:15: error: conflicting types for 'ioremap'
void __iomem *ioremap(unsigned long offset, unsigned long size)
^~~~~~~
vim +/ioremap +129 arch/sparc/include/asm/io_32.h
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 124
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 125 /*
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 126 * Bus number may be embedded in the higher bits of the physical address.
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 127 * This is why we have no bus number argument to ioremap().
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 128 */
f05a6865 arch/sparc/include/asm/io_32.h Sam Ravnborg 2014-05-16 @129 void __iomem *ioremap(unsigned long offset, unsigned long size);
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 130 #define ioremap_nocache(X,Y) ioremap((X),(Y))
428695b8 include/asm-sparc/io_32.h David S. Miller 2008-07-22 131 #define ioremap_wc(X,Y) ioremap((X),(Y))
556269c1 arch/sparc/include/asm/io_32.h Toshi Kani 2015-06-04 132 #define ioremap_wt(X,Y) ioremap((X),(Y))
f05a6865 arch/sparc/include/asm/io_32.h Sam Ravnborg 2014-05-16 133 void iounmap(volatile void __iomem *addr);
f5e706ad include/asm-sparc/io_32.h Sam Ravnborg 2008-07-17 134
:::::: The code at line 129 was first introduced by commit
:::::: f05a68653e56ca2f23bccf7e50be69486886f052 sparc: drop use of extern for prototypes in arch/sparc/include/asm
:::::: TO: Sam Ravnborg <sam@ravnborg.org>
:::::: CC: David S. Miller <davem@davemloft.net>
---
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: 12283 bytes --]
^ permalink raw reply
* Re: [PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
From: kbuild test robot @ 2017-12-20 10:10 UTC (permalink / raw)
Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
dhowells, will.deacon, daniel.lezcano, linux-serial,
geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
pombredanne, green.hu, Vincent Chen
In-Reply-To: <d25ea659bc370a6bb24c4d42416f890a34051df1.1513577007.git.green.hu@gmail.com>
[-- Attachment #1: Type: text/plain, Size: 4102 bytes --]
Hi Greentime,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/timers/core]
[also build test ERROR on v4.15-rc4 next-20171220]
[cannot apply to linus/master]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
config: openrisc-or1ksim_defconfig (attached as .config)
compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=openrisc
All error/warnings (new ones prefixed by >>):
In file included from include/linux/io.h:25:0,
from arch/openrisc/kernel/asm-offsets.c:35:
>> arch/openrisc/include/asm/io.h:38:29: error: conflicting types for 'ioremap'
static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
^~~~~~~
In file included from arch/openrisc/include/asm/io.h:32:0,
from include/linux/io.h:25,
from arch/openrisc/kernel/asm-offsets.c:35:
include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
^~~~~~~
include/asm-generic/io.h:865:25: error: conflicting types for 'ioremap_nocache'
#define ioremap_nocache ioremap_nocache
^
>> arch/openrisc/include/asm/io.h:44:29: note: in expansion of macro 'ioremap_nocache'
static inline void __iomem *ioremap_nocache(phys_addr_t offset,
^~~~~~~~~~~~~~~
include/asm-generic/io.h:865:25: note: previous definition of 'ioremap_nocache' was here
#define ioremap_nocache ioremap_nocache
^
include/asm-generic/io.h:866:29: note: in expansion of macro 'ioremap_nocache'
static inline void __iomem *ioremap_nocache(phys_addr_t offset, size_t size)
^~~~~~~~~~~~~~~
make[2]: *** [arch/openrisc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
vim +/ioremap +38 arch/openrisc/include/asm/io.h
58e0166a Jonas Bonn 2011-06-04 31
58e0166a Jonas Bonn 2011-06-04 @32 #include <asm-generic/io.h>
9b04ebd1 James Hogan 2012-10-23 33 #include <asm/pgtable.h>
58e0166a Jonas Bonn 2011-06-04 34
58e0166a Jonas Bonn 2011-06-04 35 extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
58e0166a Jonas Bonn 2011-06-04 36 pgprot_t prot);
58e0166a Jonas Bonn 2011-06-04 37
58e0166a Jonas Bonn 2011-06-04 @38 static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
58e0166a Jonas Bonn 2011-06-04 39 {
58e0166a Jonas Bonn 2011-06-04 40 return __ioremap(offset, size, PAGE_KERNEL);
58e0166a Jonas Bonn 2011-06-04 41 }
58e0166a Jonas Bonn 2011-06-04 42
58e0166a Jonas Bonn 2011-06-04 43 /* #define _PAGE_CI 0x002 */
58e0166a Jonas Bonn 2011-06-04 @44 static inline void __iomem *ioremap_nocache(phys_addr_t offset,
58e0166a Jonas Bonn 2011-06-04 45 unsigned long size)
58e0166a Jonas Bonn 2011-06-04 46 {
58e0166a Jonas Bonn 2011-06-04 47 return __ioremap(offset, size,
58e0166a Jonas Bonn 2011-06-04 48 __pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI));
58e0166a Jonas Bonn 2011-06-04 49 }
58e0166a Jonas Bonn 2011-06-04 50
:::::: The code at line 38 was first introduced by commit
:::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers
:::::: TO: Jonas Bonn <jonas@southpole.se>
:::::: CC: Jonas Bonn <jonas@southpole.se>
---
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: 7613 bytes --]
^ permalink raw reply
* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: Greentime Hu @ 2017-12-20 10:34 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: kbuild test robot, kbuild-all, Greentime,
Linux Kernel Mailing List, Arnd Bergmann, Linux-Arch,
Thomas Gleixner, Jason Cooper, Marc Zyngier, Rob Herring, netdev,
Vincent Chen, DTML, Al Viro, David Howells, Will Deacon,
Daniel Lezcano, linux-serial, Linus Walleij, Mark Rutland,
Greg KH
In-Reply-To: <CAMuHMdXp5b-Y79kaKgmDRshnpN2=VEd-f3v-6QW+6mUqv6YW-A@mail.gmail.com>
2017-12-20 17:58 GMT+08:00 Geert Uytterhoeven <geert@linux-m68k.org>:
> On Wed, Dec 20, 2017 at 10:54 AM, kbuild test robot <lkp@intel.com> wrote:
>> I love your patch! Perhaps something to improve:
>>
>> [auto build test WARNING on tip/timers/core]
>> [cannot apply to linus/master v4.15-rc4 next-20171220]
>> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>>
>> url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
>> config: sparc64-allyesconfig (attached as .config)
>> compiler: sparc64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
>> reproduce:
>> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
>> chmod +x ~/bin/make.cross
>> # save the attached .config to linux build tree
>> make.cross ARCH=sparc64
>>
>> All warnings (new ones prefixed by >>):
>>
>> drivers/net/ethernet/faraday/ftmac100.c: In function 'ftmac100_rxdes_set_page':
>>>> drivers/net/ethernet/faraday/ftmac100.c:288:18: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>> rxdes->rxdes3 = (unsigned int)page;
>> ^
>
> The proper way to casts pointer to integers is to cast to "uintptr_t".
>
> However, the address is stored in a 32-bit descriptor, which means it can
> not work on 64-bit platforms.
>
> Please make the driver depend on "!64BIT || BROKEN"
>
> Cfr. commit 15bfe05c8d6386f1 ("net: ethernet: xilinx: Mark XILINX_LL_TEMAC
> broken on 64-bit")
>
Thanks Geert.
I will apply it like this.
+++ b/drivers/net/ethernet/faraday/Kconfig
@@ -5,7 +5,7 @@
config NET_VENDOR_FARADAY
bool "Faraday devices"
default y
- depends on ARM
+ depends on ARM || NDS32 || COMPILE_TEST
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
@@ -18,7 +18,8 @@ if NET_VENDOR_FARADAY
config FTMAC100
tristate "Faraday FTMAC100 10/100 Ethernet support"
- depends on ARM
+ depends on ARM || NDS32 || COMPILE_TEST
+ depends on !64BIT || BROKEN
select MII
---help---
This driver supports the FTMAC100 10/100 Ethernet controller
@@ -27,7 +28,8 @@ config FTMAC100
config FTGMAC100
tristate "Faraday FTGMAC100 Gigabit Ethernet support"
- depends on ARM
+ depends on ARM || NDS32 || COMPILE_TEST
+ depends on !64BIT || BROKEN
select PHYLIB
---help---
This driver supports the FTGMAC100 Gigabit Ethernet controller
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Jarkko Nikula @ 2017-12-20 10:54 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Joe Perches, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Cezary Jackiewicz, Darren Hart, Andy Shevchenko, Sebastian Ott,
Peter Oberparleiter, James Smart, Dick Kennedy, Zhang Rui,
Eduardo Valentin, Mathias Nyman, Felipe Balbi, Luis R. Rodriguez,
Peter Ujfalusi, Martin Schwidefsky
In-Reply-To: <20171220093211.GA16177@kroah.com>
On Wed, Dec 20, 2017 at 10:32:11AM +0100, Greg Kroah-Hartman wrote:
> On Wed, Dec 20, 2017 at 01:24:44AM -0800, Joe Perches wrote:
> > On Wed, 2017-12-20 at 10:34 +0200, Jarkko Nikula wrote:
> > > On Tue, Dec 19, 2017 at 10:15:07AM -0800, Joe Perches wrote:
> > > > Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
> > []
> > > > diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> > []
> > > > @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device *dev,
> > > > return size;
> > > > }
> > > >
> > > > -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show, dma_op_mode_store);
> > > > +static DEVICE_ATTR_RW(dma_op_mode);
> > > >
> > >
> > > While I can ack this part here if it helps generic cleanup effort I
> > > don't understart would it improve code readability in general? Mode 644
> > > is clear and don't need any grepping but for DEVICE_ATTR_RW() I had to go
> > > through all of these files in order to see what does it mean:
>
> Yeah, 644 is "clear", but _RW() is even more clear. Ideally I want to
> get rid of all of the "non-standard" users that set random modes of
> sysfs files, as we get it wrong too many times. Using the "defaults" is
> much better.
>
Fair enough. For the sound/soc/omap/ (Acked-by was missing from my
previous reply):
Acked-by: Jarkko Nikula <jarkko.nikula@bitmer.com>
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Joe Perches @ 2017-12-20 10:55 UTC (permalink / raw)
To: Greg Kroah-Hartman, Julia Lawall
Cc: linux-fbdev, David Airlie, Joonas Lahtinen, Heiko Carstens,
alsa-devel, dri-devel, Jaroslav Kysela, Peter Ujfalusi,
linux-s390, linux-omap, James E.J. Bottomley, linux-scsi,
Takashi Iwai, Sebastian Ott, James Smart, Cezary Jackiewicz,
linux-serial, Jiri Slaby, Darren Hart, Zhang Rui, Dick Kennedy,
Mathias Nyman, Bartlomiej Zolnierkiewicz,
Peter Oberparleiter <oberp>
In-Reply-To: <20171220095926.GA24285@kroah.com>
On Wed, 2017-12-20 at 10:59 +0100, Greg Kroah-Hartman wrote:
> > > Why you didn't send that patch to the sysfs maintainer is a bit odd... :)
> >
> > So here's an opportunity for you:
> >
> > The sysfs maintainer hasn't added include/linux/sysfs.h to
> > the list of maintained files...
> >
> > DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
> > M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
> > S: Supported
> > F: Documentation/kobject.txt
> > F: drivers/base/
> > F: fs/debugfs/
> > F: fs/sysfs/
> > F: include/linux/debugfs.h
> > F: include/linux/kobj*
> > F: lib/kobj*
>
> Heh, good point, but using get_maintainer.pl does put me at the top of
> the list that you should be cc:ing:
>
> $ ./scripts/get_maintainer.pl --file include/linux/sysfs.h
> Greg Kroah-Hartman <gregkh@linuxfoundation.org> (commit_signer:3/3=100%,authored:2/3=67%,added_lines:7/8=88%)
> Kate Stewart <kstewart@linuxfoundation.org> (commit_signer:1/3=33%)
> Thomas Gleixner <tglx@linutronix.de> (commit_signer:1/3=33%)
> Philippe Ombredanne <pombredanne@nexb.com> (commit_signer:1/3=33%)
> Nick Desaulniers <nick.desaulniers@gmail.com> (commit_signer:1/3=33%,authored:1/3=33%,added_lines:1/8=12%,removed_lines:1/1=100%)
> linux-kernel@vger.kernel.org (open list)
The script I use to send patches adds --nogit --nogit-fallback
to copy only listed maintainers because people that send cleanup
patches don't generally like to get random patches.
> > btw: there are many uses of a reversed declaration style of DEVICE_ATTR
> >
> > Here's another thing that could be done for more DEVICE_ATTR_<FOO> uses.
> >
> > ===
> >
> > Some DEVICE_ATTR definitions use a reversed static function form from
> > the typical. Convert them to use the more common macro form so it is
> > easier to grep for the style.
[]
> > $ git grep --name-only -w DEVICE_ATTR | \
> > xargs perl -i dev_attr_rw_backwards.perl
> Ah, nice, I love perl :
That was a bad copy/paste of the script.
The actual script for RW is:
$ cat dev_attr_rw_backwards.perl
local $/;
while (<>) {
my $file = $_;
while ($file =~ m/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,/g) {
my $var = $1;
if ($file =~ s/\bDEVICE_ATTR\s*\(\s*${var}\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S_IWUSR|\s*S_IWUSR\s*\|\s*S_IRUGO\s*|\s*0644\s*)\)?\s*,\s*show_${var}\s*,\s*store_${var}\s*\)/DEVICE_ATTR_RW(${var})/g) {
$file =~ s/\bshow_${var}\b/${var}_show/g;
$file =~ s/\bstore_${var}\b/${var}_store/g;
}
}
print $file;
}
There are 3 different perl scripts for rw, ro, and wo.
and these scripts, because of function renaming and
possible reuse of the original function names by other
string concatenated macros, create some bad conversions
so they need some manual cleanups too.
Perhaps coccinelle could do a better job of it, but
likely string concatenation macro uses are going to
be hard to deal with in any case.
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* Re: [PATCH v4 33/36] net: faraday add nds32 support.
From: kbuild test robot @ 2017-12-20 11:03 UTC (permalink / raw)
Cc: kbuild-all, greentime, linux-kernel, arnd, linux-arch, tglx,
jason, marc.zyngier, robh+dt, netdev, deanbo422, devicetree, viro,
dhowells, will.deacon, daniel.lezcano, linux-serial,
geert.uytterhoeven, linus.walleij, mark.rutland, greg, ren_guo,
pombredanne, green.hu
In-Reply-To: <95be78502aa406f106ecbe87e751a45333883b1f.1513577007.git.green.hu@gmail.com>
Hi Greentime,
I love your patch! Perhaps something to improve:
[auto build test WARNING on tip/timers/core]
[cannot apply to linus/master v4.15-rc4 next-20171220]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
reproduce:
# apt-get install sparse
make ARCH=x86_64 allmodconfig
make C=1 CF=-D__CHECK_ENDIAN__
sparse warnings: (new ones prefixed by >>)
vim +205 drivers/net/ethernet/faraday/ftmac100.c
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 199
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 200 /******************************************************************************
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 201 * internal functions (receive descriptor)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 202 *****************************************************************************/
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 203 static bool ftmac100_rxdes_first_segment(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 204 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @205 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_FRS);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 206 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 207
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 208 static bool ftmac100_rxdes_last_segment(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 209 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 210 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_LRS);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 211 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 212
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 213 static bool ftmac100_rxdes_owned_by_dma(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 214 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @215 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RXDMA_OWN);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 216 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 217
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 218 static void ftmac100_rxdes_set_dma_own(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 219 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 220 /* clear status bits */
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @221 rxdes->rxdes0 = cpu_to_le32(FTMAC100_RXDES0_RXDMA_OWN);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 222 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 223
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 224 static bool ftmac100_rxdes_rx_error(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 225 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 226 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RX_ERR);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 227 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 228
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 229 static bool ftmac100_rxdes_crc_error(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 230 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 231 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_CRC_ERR);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 232 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 233
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 234 static bool ftmac100_rxdes_frame_too_long(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 235 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 236 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_FTL);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 237 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 238
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 239 static bool ftmac100_rxdes_runt(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 240 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 241 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RUNT);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 242 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 243
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 244 static bool ftmac100_rxdes_odd_nibble(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 245 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 246 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_RX_ODD_NB);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 247 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 248
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 249 static unsigned int ftmac100_rxdes_frame_length(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 250 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @251 return le32_to_cpu(rxdes->rxdes0) & FTMAC100_RXDES0_RFL;
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 252 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 253
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 254 static bool ftmac100_rxdes_multicast(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 255 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 256 return rxdes->rxdes0 & cpu_to_le32(FTMAC100_RXDES0_MULTICAST);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 257 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 258
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 259 static void ftmac100_rxdes_set_buffer_size(struct ftmac100_rxdes *rxdes,
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 260 unsigned int size)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 261 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @262 rxdes->rxdes1 &= cpu_to_le32(FTMAC100_RXDES1_EDORR);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 263 rxdes->rxdes1 |= cpu_to_le32(FTMAC100_RXDES1_RXBUF_SIZE(size));
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 264 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 265
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 266 static void ftmac100_rxdes_set_end_of_ring(struct ftmac100_rxdes *rxdes)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 267 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 268 rxdes->rxdes1 |= cpu_to_le32(FTMAC100_RXDES1_EDORR);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 269 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 270
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 271 static void ftmac100_rxdes_set_dma_addr(struct ftmac100_rxdes *rxdes,
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 272 dma_addr_t addr)
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 273 {
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 @274 rxdes->rxdes2 = cpu_to_le32(addr);
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 275 }
8d77c036 drivers/net/ftmac100.c Po-Yu Chuang 2011-02-28 276
:::::: The code at line 205 was first introduced by commit
:::::: 8d77c036b57cf813d838f859e11b6a188acdb1fb net: add Faraday FTMAC100 10/100 Ethernet driver
:::::: TO: Po-Yu Chuang <ratbert@faraday-tech.com>
:::::: CC: David S. Miller <davem@davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
^ permalink raw reply
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Julia Lawall @ 2017-12-20 13:26 UTC (permalink / raw)
To: Joe Perches
Cc: linux-fbdev, David Airlie, Joonas Lahtinen, Heiko Carstens,
alsa-devel, dri-devel, Jaroslav Kysela, Peter Ujfalusi,
linux-s390, linux-omap, James E.J. Bottomley, linux-scsi,
Takashi Iwai, Sebastian Ott, James Smart, Cezary Jackiewicz,
linux-serial, Jiri Slaby, Darren Hart, Zhang Rui, Dick Kennedy,
Mathias Nyman, Bartlomiej Zolnierkiewicz,
Peter Oberparleiter <oberp>
In-Reply-To: <1513767307.1234.114.camel@perches.com>
On Wed, 20 Dec 2017, Joe Perches wrote:
> On Wed, 2017-12-20 at 10:59 +0100, Greg Kroah-Hartman wrote:
> > > > Why you didn't send that patch to the sysfs maintainer is a bit odd... :)
> > >
> > > So here's an opportunity for you:
> > >
> > > The sysfs maintainer hasn't added include/linux/sysfs.h to
> > > the list of maintained files...
> > >
> > > DRIVER CORE, KOBJECTS, DEBUGFS AND SYSFS
> > > M: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> > > T: git git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
> > > S: Supported
> > > F: Documentation/kobject.txt
> > > F: drivers/base/
> > > F: fs/debugfs/
> > > F: fs/sysfs/
> > > F: include/linux/debugfs.h
> > > F: include/linux/kobj*
> > > F: lib/kobj*
> >
> > Heh, good point, but using get_maintainer.pl does put me at the top of
> > the list that you should be cc:ing:
> >
> > $ ./scripts/get_maintainer.pl --file include/linux/sysfs.h
> > Greg Kroah-Hartman <gregkh@linuxfoundation.org> (commit_signer:3/3=100%,authored:2/3=67%,added_lines:7/8=88%)
> > Kate Stewart <kstewart@linuxfoundation.org> (commit_signer:1/3=33%)
> > Thomas Gleixner <tglx@linutronix.de> (commit_signer:1/3=33%)
> > Philippe Ombredanne <pombredanne@nexb.com> (commit_signer:1/3=33%)
> > Nick Desaulniers <nick.desaulniers@gmail.com> (commit_signer:1/3=33%,authored:1/3=33%,added_lines:1/8=12%,removed_lines:1/1=100%)
> > linux-kernel@vger.kernel.org (open list)
>
> The script I use to send patches adds --nogit --nogit-fallback
> to copy only listed maintainers because people that send cleanup
> patches don't generally like to get random patches.
>
> > > btw: there are many uses of a reversed declaration style of DEVICE_ATTR
> > >
> > > Here's another thing that could be done for more DEVICE_ATTR_<FOO> uses.
> > >
> > > ===
> > >
> > > Some DEVICE_ATTR definitions use a reversed static function form from
> > > the typical. Convert them to use the more common macro form so it is
> > > easier to grep for the style.
> []
> > > $ git grep --name-only -w DEVICE_ATTR | \
> > > xargs perl -i dev_attr_rw_backwards.perl
> > Ah, nice, I love perl :
>
> That was a bad copy/paste of the script.
>
> The actual script for RW is:
>
> $ cat dev_attr_rw_backwards.perl
> local $/;
> while (<>) {
> my $file = $_;
> while ($file =~ m/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,/g) {
> my $var = $1;
> if ($file =~ s/\bDEVICE_ATTR\s*\(\s*${var}\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S_IWUSR|\s*S_IWUSR\s*\|\s*S_IRUGO\s*|\s*0644\s*)\)?\s*,\s*show_${var}\s*,\s*store_${var}\s*\)/DEVICE_ATTR_RW(${var})/g) {
> $file =~ s/\bshow_${var}\b/${var}_show/g;
> $file =~ s/\bstore_${var}\b/${var}_store/g;
> }
> }
> print $file;
> }
>
> There are 3 different perl scripts for rw, ro, and wo.
> and these scripts, because of function renaming and
> possible reuse of the original function names by other
> string concatenated macros, create some bad conversions
> so they need some manual cleanups too.
>
> Perhaps coccinelle could do a better job of it, but
> likely string concatenation macro uses are going to
> be hard to deal with in any case.
I made a rule for this at one point, but there are cases where the
functions have the wrong names, and then these functions may be used
elsewhere.
julia
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply
* [PATCH v16 1/5] serdev: Make .remove in struct serdev_device_driver optional
From: Andrey Smirnov @ 2017-12-20 20:45 UTC (permalink / raw)
To: Lee Jones
Cc: Andrey Smirnov, linux-kernel, linux-serial, Rob Herring, cphealy,
Guenter Roeck, Lucas Stach, Nikita Yushchenko, Greg Kroah-Hartman,
Pavel Machek, Andy Shevchenko, Johan Hovold, Sebastian Reichel,
Philippe Ombredanne
In-Reply-To: <20171220204517.28313-1-andrew.smirnov@gmail.com>
Using devres infrastructure it is possible to write a serdev driver
that doesn't have any code that needs to be called as a part of
.remove. Add code to make .remove optional.
Cc: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: cphealy@gmail.com
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
drivers/tty/serdev/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 1bef39828ca7..34050b439c1f 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -268,8 +268,8 @@ static int serdev_drv_probe(struct device *dev)
static int serdev_drv_remove(struct device *dev)
{
const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver);
-
- sdrv->remove(to_serdev_device(dev));
+ if (sdrv->remove)
+ sdrv->remove(to_serdev_device(dev));
return 0;
}
--
2.14.3
^ permalink raw reply related
* [PATCH v16 2/5] serdev: Introduce devm_serdev_device_open()
From: Andrey Smirnov @ 2017-12-20 20:45 UTC (permalink / raw)
To: Lee Jones
Cc: Andrey Smirnov, linux-kernel, linux-serial, Rob Herring, cphealy,
Guenter Roeck, Lucas Stach, Nikita Yushchenko, Greg Kroah-Hartman,
Pavel Machek, Andy Shevchenko, Johan Hovold, Sebastian Reichel,
Philippe Ombredanne
In-Reply-To: <20171220204517.28313-1-andrew.smirnov@gmail.com>
Add code implementing managed version of serdev_device_open() for
serdev device drivers that "open" the device during driver's lifecycle
only once (e.g. opened in .probe() and closed in .remove()).
Cc: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: cphealy@gmail.com
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Documentation/driver-model/devres.txt | 3 +++
drivers/tty/serdev/core.c | 27 +++++++++++++++++++++++++++
include/linux/serdev.h | 1 +
3 files changed, 31 insertions(+)
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index c180045eb43b..7c1bb3d0c222 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -384,6 +384,9 @@ RESET
devm_reset_control_get()
devm_reset_controller_register()
+SERDEV
+ devm_serdev_device_open()
+
SLAVE DMA ENGINE
devm_acpi_dma_controller_register()
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 34050b439c1f..28133dbd2808 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -132,6 +132,33 @@ void serdev_device_close(struct serdev_device *serdev)
}
EXPORT_SYMBOL_GPL(serdev_device_close);
+static void devm_serdev_device_release(struct device *dev, void *dr)
+{
+ serdev_device_close(*(struct serdev_device **)dr);
+}
+
+int devm_serdev_device_open(struct device *dev, struct serdev_device *serdev)
+{
+ struct serdev_device **dr;
+ int ret;
+
+ dr = devres_alloc(devm_serdev_device_release, sizeof(*dr), GFP_KERNEL);
+ if (!dr)
+ return -ENOMEM;
+
+ ret = serdev_device_open(serdev);
+ if (ret) {
+ devres_free(dr);
+ return ret;
+ }
+
+ *dr = serdev;
+ devres_add(dev, dr);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(devm_serdev_device_open);
+
void serdev_device_write_wakeup(struct serdev_device *serdev)
{
complete(&serdev->write_comp);
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index e69402d4a8ae..9929063bd45d 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -193,6 +193,7 @@ static inline int serdev_controller_receive_buf(struct serdev_controller *ctrl,
int serdev_device_open(struct serdev_device *);
void serdev_device_close(struct serdev_device *);
+int devm_serdev_device_open(struct device *, struct serdev_device *);
unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int);
void serdev_device_set_flow_control(struct serdev_device *, bool);
int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_t);
--
2.14.3
^ permalink raw reply related
* Re: [-next PATCH 2/4] treewide: Use DEVICE_ATTR_RW
From: Zhang Rui @ 2017-12-21 0:47 UTC (permalink / raw)
To: Joe Perches, Jani Nikula, Joonas Lahtinen, Rodrigo Vivi,
Cezary Jackiewicz, Darren Hart, Andy Shevchenko, Sebastian Ott,
Peter Oberparleiter, James Smart, Dick Kennedy, Eduardo Valentin,
Greg Kroah-Hartman, Mathias Nyman, Felipe Balbi,
Luis R. Rodriguez, Peter Ujfalusi, Jarkko Nikula
Cc: alsa-devel, Liam Girdwood, David Airlie, Heiko Carstens,
linux-fbdev, dri-devel, Takashi Iwai, linux-s390, linux-omap,
James E.J. Bottomley, linux-scsi, linux-pm, linux-serial,
Jiri Slaby, platform-driver-x86, Bartlomiej Zolnierkiewicz,
intel-gfx, Mark Brown, Jaroslav Kysela, Martin K. Petersen,
linux-usb, linux-kernel, Martin Schwidefsky
In-Reply-To: <cd38f14f06e1f447b3159ffe8c69c0df8241bb6e.1513706701.git.joe@perches.com>
On Tue, 2017-12-19 at 10:15 -0800, Joe Perches wrote:
> Convert DEVICE_ATTR uses to DEVICE_ATTR_RW where possible.
>
> Done with perl script:
>
> $ git grep -w --name-only DEVICE_ATTR | \
> xargs perl -i -e 'local $/; while (<>) {
> s/\bDEVICE_ATTR\s*\(\s*(\w+)\s*,\s*\(?(\s*S_IRUGO\s*\|\s*S_IWUSR|\s*S
> _IWUSR\s*\|\s*S_IRUGO\s*|\s*0644\s*)\)?\s*,\s*\1_show\s*,\s*\1_store\
> s*\)/DEVICE_ATTR_RW(\1)/g; print;}'
>
> Signed-off-by: Joe Perches <joe@perches.com>
> ---
> arch/s390/kernel/topology.c | 3 +--
> arch/tile/kernel/sysfs.c | 2 +-
> drivers/gpu/drm/i915/i915_sysfs.c | 6 ++---
> drivers/platform/x86/compal-laptop.c | 18 +++++----------
> drivers/s390/cio/device.c | 2 +-
> drivers/scsi/lpfc/lpfc_attr.c | 43 ++++++++++++------------
> ------------
> drivers/thermal/thermal_sysfs.c | 9 ++++----
For the thermal part,
ACK-by: Zhang Rui <rui.zhang@intel.com>
thanks,
rui
> drivers/tty/serial/sh-sci.c | 2 +-
> drivers/usb/host/xhci-dbgcap.c | 2 +-
> drivers/usb/phy/phy-tahvo.c | 2 +-
> drivers/video/fbdev/auo_k190x.c | 4 ++--
> drivers/video/fbdev/w100fb.c | 4 ++--
> lib/test_firmware.c | 14 +++++-------
> lib/test_kmod.c | 14 +++++-------
> sound/soc/omap/mcbsp.c | 4 ++--
> 15 files changed, 49 insertions(+), 80 deletions(-)
>
> diff --git a/arch/s390/kernel/topology.c
> b/arch/s390/kernel/topology.c
> index 4d5b65e527b5..4b6e0397f66d 100644
> --- a/arch/s390/kernel/topology.c
> +++ b/arch/s390/kernel/topology.c
> @@ -404,8 +404,7 @@ static ssize_t dispatching_store(struct device
> *dev,
> put_online_cpus();
> return rc ? rc : count;
> }
> -static DEVICE_ATTR(dispatching, 0644, dispatching_show,
> - dispatching_store);
> +static DEVICE_ATTR_RW(dispatching);
>
> static ssize_t cpu_polarization_show(struct device *dev,
> struct device_attribute *attr,
> char *buf)
> diff --git a/arch/tile/kernel/sysfs.c b/arch/tile/kernel/sysfs.c
> index 825867c53853..af5024f0fb5a 100644
> --- a/arch/tile/kernel/sysfs.c
> +++ b/arch/tile/kernel/sysfs.c
> @@ -184,7 +184,7 @@ static ssize_t hv_stats_store(struct device *dev,
> return n < 0 ? n : count;
> }
>
> -static DEVICE_ATTR(hv_stats, 0644, hv_stats_show, hv_stats_store);
> +static DEVICE_ATTR_RW(hv_stats);
>
> static int hv_stats_device_add(struct device *dev, struct
> subsys_interface *sif)
> {
> diff --git a/drivers/gpu/drm/i915/i915_sysfs.c
> b/drivers/gpu/drm/i915/i915_sysfs.c
> index c74a20b80182..1d0ab8ff5915 100644
> --- a/drivers/gpu/drm/i915/i915_sysfs.c
> +++ b/drivers/gpu/drm/i915/i915_sysfs.c
> @@ -447,9 +447,9 @@ static ssize_t gt_min_freq_mhz_store(struct
> device *kdev,
>
> static DEVICE_ATTR(gt_act_freq_mhz, S_IRUGO, gt_act_freq_mhz_show,
> NULL);
> static DEVICE_ATTR(gt_cur_freq_mhz, S_IRUGO, gt_cur_freq_mhz_show,
> NULL);
> -static DEVICE_ATTR(gt_boost_freq_mhz, S_IRUGO | S_IWUSR,
> gt_boost_freq_mhz_show, gt_boost_freq_mhz_store);
> -static DEVICE_ATTR(gt_max_freq_mhz, S_IRUGO | S_IWUSR,
> gt_max_freq_mhz_show, gt_max_freq_mhz_store);
> -static DEVICE_ATTR(gt_min_freq_mhz, S_IRUGO | S_IWUSR,
> gt_min_freq_mhz_show, gt_min_freq_mhz_store);
> +static DEVICE_ATTR_RW(gt_boost_freq_mhz);
> +static DEVICE_ATTR_RW(gt_max_freq_mhz);
> +static DEVICE_ATTR_RW(gt_min_freq_mhz);
>
> static DEVICE_ATTR(vlv_rpe_freq_mhz, S_IRUGO, vlv_rpe_freq_mhz_show,
> NULL);
>
> diff --git a/drivers/platform/x86/compal-laptop.c
> b/drivers/platform/x86/compal-laptop.c
> index 6bcb750e1865..4f9bc72f0584 100644
> --- a/drivers/platform/x86/compal-laptop.c
> +++ b/drivers/platform/x86/compal-laptop.c
> @@ -679,18 +679,12 @@ static int bat_writeable_property(struct
> power_supply *psy,
> /* ============== */
> /* Driver Globals */
> /* ============== */
> -static DEVICE_ATTR(wake_up_pme,
> - 0644, wake_up_pme_show, wake_up_pme_s
> tore);
> -static DEVICE_ATTR(wake_up_modem,
> - 0644, wake_up_modem_show, wake_up_modem_store
> );
> -static DEVICE_ATTR(wake_up_lan,
> - 0644, wake_up_lan_show, wake_up_lan_store);
> -static DEVICE_ATTR(wake_up_wlan,
> - 0644, wake_up_wlan_show, wake_up_wlan_store);
> -static DEVICE_ATTR(wake_up_key,
> - 0644, wake_up_key_show, wake_up_key_store);
> -static DEVICE_ATTR(wake_up_mouse,
> - 0644, wake_up_mouse_show, wake_up_mouse_store
> );
> +static DEVICE_ATTR_RW(wake_up_pme);
> +static DEVICE_ATTR_RW(wake_up_modem);
> +static DEVICE_ATTR_RW(wake_up_lan);
> +static DEVICE_ATTR_RW(wake_up_wlan);
> +static DEVICE_ATTR_RW(wake_up_key);
> +static DEVICE_ATTR_RW(wake_up_mouse);
>
> static DEVICE_ATTR(fan1_input, S_IRUGO, fan_show, NULL);
> static DEVICE_ATTR(temp1_input, S_IRUGO, temp_cpu, NULL);
> diff --git a/drivers/s390/cio/device.c b/drivers/s390/cio/device.c
> index 75a245f38e2e..6eefb67b31f3 100644
> --- a/drivers/s390/cio/device.c
> +++ b/drivers/s390/cio/device.c
> @@ -600,7 +600,7 @@ static ssize_t vpm_show(struct device *dev,
> struct device_attribute *attr,
> static DEVICE_ATTR(devtype, 0444, devtype_show, NULL);
> static DEVICE_ATTR(cutype, 0444, cutype_show, NULL);
> static DEVICE_ATTR(modalias, 0444, modalias_show, NULL);
> -static DEVICE_ATTR(online, 0644, online_show, online_store);
> +static DEVICE_ATTR_RW(online);
> static DEVICE_ATTR(availability, 0444, available_show, NULL);
> static DEVICE_ATTR(logging, 0200, NULL, initiate_logging);
> static DEVICE_ATTR(vpm, 0444, vpm_show, NULL);
> diff --git a/drivers/scsi/lpfc/lpfc_attr.c
> b/drivers/scsi/lpfc/lpfc_attr.c
> index 797bb42a6306..95f7ba3c3f1a 100644
> --- a/drivers/scsi/lpfc/lpfc_attr.c
> +++ b/drivers/scsi/lpfc/lpfc_attr.c
> @@ -2519,8 +2519,7 @@ lpfc_soft_wwpn_store(struct device *dev, struct
> device_attribute *attr,
> "reinit adapter - %d\n", stat2);
> return (stat1 || stat2) ? -EIO : count;
> }
> -static DEVICE_ATTR(lpfc_soft_wwpn, S_IRUGO | S_IWUSR,
> - lpfc_soft_wwpn_show, lpfc_soft_wwpn_store);
> +static DEVICE_ATTR_RW(lpfc_soft_wwpn);
>
> /**
> * lpfc_soft_wwnn_show - Return the cfg soft ww node name for the
> adapter
> @@ -2583,8 +2582,7 @@ lpfc_soft_wwnn_store(struct device *dev, struct
> device_attribute *attr,
>
> return count;
> }
> -static DEVICE_ATTR(lpfc_soft_wwnn, S_IRUGO | S_IWUSR,
> - lpfc_soft_wwnn_show, lpfc_soft_wwnn_store);
> +static DEVICE_ATTR_RW(lpfc_soft_wwnn);
>
> /**
> * lpfc_oas_tgt_show - Return wwpn of target whose luns maybe
> enabled for
> @@ -3102,8 +3100,7 @@ MODULE_PARM_DESC(lpfc_poll, "FCP ring polling
> mode control:"
> " 1 - poll with interrupts enabled"
> " 3 - poll and disable FCP ring interrupts");
>
> -static DEVICE_ATTR(lpfc_poll, S_IRUGO | S_IWUSR,
> - lpfc_poll_show, lpfc_poll_store);
> +static DEVICE_ATTR_RW(lpfc_poll);
>
> int lpfc_no_hba_reset_cnt;
> unsigned long lpfc_no_hba_reset[MAX_HBAS_NO_RESET] = {
> @@ -3336,8 +3333,7 @@ lpfc_nodev_tmo_set(struct lpfc_vport *vport,
> int val)
>
> lpfc_vport_param_store(nodev_tmo)
>
> -static DEVICE_ATTR(lpfc_nodev_tmo, S_IRUGO | S_IWUSR,
> - lpfc_nodev_tmo_show, lpfc_nodev_tmo_store);
> +static DEVICE_ATTR_RW(lpfc_nodev_tmo);
>
> /*
> # lpfc_devloss_tmo: If set, it will hold all I/O errors on devices
> that
> @@ -3386,8 +3382,7 @@ lpfc_devloss_tmo_set(struct lpfc_vport *vport,
> int val)
> }
>
> lpfc_vport_param_store(devloss_tmo)
> -static DEVICE_ATTR(lpfc_devloss_tmo, S_IRUGO | S_IWUSR,
> - lpfc_devloss_tmo_show, lpfc_devloss_tmo_store);
> +static DEVICE_ATTR_RW(lpfc_devloss_tmo);
>
> /*
> * lpfc_suppress_rsp: Enable suppress rsp feature is firmware
> supports it
> @@ -3580,8 +3575,7 @@ lpfc_restrict_login_set(struct lpfc_vport
> *vport, int val)
> return 0;
> }
> lpfc_vport_param_store(restrict_login);
> -static DEVICE_ATTR(lpfc_restrict_login, S_IRUGO | S_IWUSR,
> - lpfc_restrict_login_show,
> lpfc_restrict_login_store);
> +static DEVICE_ATTR_RW(lpfc_restrict_login);
>
> /*
> # Some disk devices have a "select ID" or "select Target"
> capability.
> @@ -3695,8 +3689,7 @@ lpfc_topology_store(struct device *dev, struct
> device_attribute *attr,
> }
>
> lpfc_param_show(topology)
> -static DEVICE_ATTR(lpfc_topology, S_IRUGO | S_IWUSR,
> - lpfc_topology_show, lpfc_topology_store);
> +static DEVICE_ATTR_RW(lpfc_topology);
>
> /**
> * lpfc_static_vport_show: Read callback function for
> @@ -3954,8 +3947,7 @@ lpfc_stat_data_ctrl_show(struct device *dev,
> struct device_attribute *attr,
> /*
> * Sysfs attribute to control the statistical data collection.
> */
> -static DEVICE_ATTR(lpfc_stat_data_ctrl, S_IRUGO | S_IWUSR,
> - lpfc_stat_data_ctrl_show,
> lpfc_stat_data_ctrl_store);
> +static DEVICE_ATTR_RW(lpfc_stat_data_ctrl);
>
> /*
> * lpfc_drvr_stat_data: sysfs attr to get driver statistical data.
> @@ -4194,8 +4186,7 @@ lpfc_link_speed_init(struct lpfc_hba *phba, int
> val)
> return -EINVAL;
> }
>
> -static DEVICE_ATTR(lpfc_link_speed, S_IRUGO | S_IWUSR,
> - lpfc_link_speed_show, lpfc_link_speed_store);
> +static DEVICE_ATTR_RW(lpfc_link_speed);
>
> /*
> # lpfc_aer_support: Support PCIe device Advanced Error Reporting
> (AER)
> @@ -4288,8 +4279,7 @@ lpfc_aer_support_store(struct device *dev,
> struct device_attribute *attr,
> return rc;
> }
>
> -static DEVICE_ATTR(lpfc_aer_support, S_IRUGO | S_IWUSR,
> - lpfc_aer_support_show, lpfc_aer_support_store);
> +static DEVICE_ATTR_RW(lpfc_aer_support);
>
> /**
> * lpfc_aer_cleanup_state - Clean up aer state to the aer enabled
> device
> @@ -4436,8 +4426,7 @@ LPFC_ATTR(sriov_nr_virtfn,
> LPFC_DEF_VFN_PER_PFN, 0, LPFC_MAX_VFN_PER_PFN,
> "Enable PCIe device SR-IOV virtual fn");
>
> lpfc_param_show(sriov_nr_virtfn)
> -static DEVICE_ATTR(lpfc_sriov_nr_virtfn, S_IRUGO | S_IWUSR,
> - lpfc_sriov_nr_virtfn_show,
> lpfc_sriov_nr_virtfn_store);
> +static DEVICE_ATTR_RW(lpfc_sriov_nr_virtfn);
>
> /**
> * lpfc_request_firmware_store - Request for Linux generic firmware
> upgrade
> @@ -4611,8 +4600,7 @@ lpfc_fcp_imax_init(struct lpfc_hba *phba, int
> val)
> return 0;
> }
>
> -static DEVICE_ATTR(lpfc_fcp_imax, S_IRUGO | S_IWUSR,
> - lpfc_fcp_imax_show, lpfc_fcp_imax_store);
> +static DEVICE_ATTR_RW(lpfc_fcp_imax);
>
> /*
> * lpfc_auto_imax: Controls Auto-interrupt coalescing values
> support.
> @@ -4772,8 +4760,7 @@ lpfc_fcp_cpu_map_init(struct lpfc_hba *phba,
> int val)
> return 0;
> }
>
> -static DEVICE_ATTR(lpfc_fcp_cpu_map, S_IRUGO | S_IWUSR,
> - lpfc_fcp_cpu_map_show, lpfc_fcp_cpu_map_store);
> +static DEVICE_ATTR_RW(lpfc_fcp_cpu_map);
>
> /*
> # lpfc_fcp_class: Determines FC class to use for the FCP protocol.
> @@ -4859,9 +4846,7 @@ lpfc_max_scsicmpl_time_set(struct lpfc_vport
> *vport, int val)
> return 0;
> }
> lpfc_vport_param_store(max_scsicmpl_time);
> -static DEVICE_ATTR(lpfc_max_scsicmpl_time, S_IRUGO | S_IWUSR,
> - lpfc_max_scsicmpl_time_show,
> - lpfc_max_scsicmpl_time_store);
> +static DEVICE_ATTR_RW(lpfc_max_scsicmpl_time);
>
> /*
> # lpfc_ack0: Use ACK0, instead of ACK1 for class 2 acknowledgement.
> Value
> diff --git a/drivers/thermal/thermal_sysfs.c
> b/drivers/thermal/thermal_sysfs.c
> index fb80c96d8f73..c008af7fb480 100644
> --- a/drivers/thermal/thermal_sysfs.c
> +++ b/drivers/thermal/thermal_sysfs.c
> @@ -398,14 +398,13 @@ create_s32_tzp_attr(offset);
> */
> static DEVICE_ATTR(type, 0444, type_show, NULL);
> static DEVICE_ATTR(temp, 0444, temp_show, NULL);
> -static DEVICE_ATTR(policy, S_IRUGO | S_IWUSR, policy_show,
> policy_store);
> +static DEVICE_ATTR_RW(policy);
> static DEVICE_ATTR(available_policies, S_IRUGO,
> available_policies_show, NULL);
> -static DEVICE_ATTR(sustainable_power, S_IWUSR | S_IRUGO,
> sustainable_power_show,
> - sustainable_power_store);
> +static DEVICE_ATTR_RW(sustainable_power);
>
> /* These thermal zone device attributes are created based on
> conditions */
> -static DEVICE_ATTR(mode, 0644, mode_show, mode_store);
> -static DEVICE_ATTR(passive, S_IRUGO | S_IWUSR, passive_show,
> passive_store);
> +static DEVICE_ATTR_RW(mode);
> +static DEVICE_ATTR_RW(passive);
>
> /* These attributes are unconditionally added to a thermal zone */
> static struct attribute *thermal_zone_dev_attrs[] = {
> diff --git a/drivers/tty/serial/sh-sci.c b/drivers/tty/serial/sh-
> sci.c
> index d9f399c4e90c..7257c078e155 100644
> --- a/drivers/tty/serial/sh-sci.c
> +++ b/drivers/tty/serial/sh-sci.c
> @@ -1144,7 +1144,7 @@ static ssize_t rx_fifo_timeout_store(struct
> device *dev,
> return count;
> }
>
> -static DEVICE_ATTR(rx_fifo_timeout, 0644, rx_fifo_timeout_show,
> rx_fifo_timeout_store);
> +static DEVICE_ATTR_RW(rx_fifo_timeout);
>
>
> #ifdef CONFIG_SERIAL_SH_SCI_DMA
> diff --git a/drivers/usb/host/xhci-dbgcap.c b/drivers/usb/host/xhci-
> dbgcap.c
> index 452df0f87d6e..a1ab8acf39ba 100644
> --- a/drivers/usb/host/xhci-dbgcap.c
> +++ b/drivers/usb/host/xhci-dbgcap.c
> @@ -920,7 +920,7 @@ static ssize_t dbc_store(struct device *dev,
> return count;
> }
>
> -static DEVICE_ATTR(dbc, 0644, dbc_show, dbc_store);
> +static DEVICE_ATTR_RW(dbc);
>
> int xhci_dbc_init(struct xhci_hcd *xhci)
> {
> diff --git a/drivers/usb/phy/phy-tahvo.c b/drivers/usb/phy/phy-
> tahvo.c
> index b3ce42edb373..7f7c5c82420d 100644
> --- a/drivers/usb/phy/phy-tahvo.c
> +++ b/drivers/usb/phy/phy-tahvo.c
> @@ -310,7 +310,7 @@ static ssize_t otg_mode_store(struct device
> *device,
>
> return r;
> }
> -static DEVICE_ATTR(otg_mode, 0644, otg_mode_show, otg_mode_store);
> +static DEVICE_ATTR_RW(otg_mode);
>
> static struct attribute *tahvo_attributes[] = {
> &dev_attr_vbus.attr,
> diff --git a/drivers/video/fbdev/auo_k190x.c
> b/drivers/video/fbdev/auo_k190x.c
> index 0d06038324e0..1e383c547633 100644
> --- a/drivers/video/fbdev/auo_k190x.c
> +++ b/drivers/video/fbdev/auo_k190x.c
> @@ -708,8 +708,8 @@ static ssize_t temp_show(struct device *dev,
> struct device_attribute *attr,
> return sprintf(buf, "%d\n", temp);
> }
>
> -static DEVICE_ATTR(update_mode, 0644, update_mode_show,
> update_mode_store);
> -static DEVICE_ATTR(flash, 0644, flash_show, flash_store);
> +static DEVICE_ATTR_RW(update_mode);
> +static DEVICE_ATTR_RW(flash);
> static DEVICE_ATTR(temp, 0644, temp_show, NULL);
>
> static struct attribute *auok190x_attributes[] = {
> diff --git a/drivers/video/fbdev/w100fb.c
> b/drivers/video/fbdev/w100fb.c
> index d570e19a2864..035ff6e02894 100644
> --- a/drivers/video/fbdev/w100fb.c
> +++ b/drivers/video/fbdev/w100fb.c
> @@ -110,7 +110,7 @@ static ssize_t flip_store(struct device *dev,
> struct device_attribute *attr, con
> return count;
> }
>
> -static DEVICE_ATTR(flip, 0644, flip_show, flip_store);
> +static DEVICE_ATTR_RW(flip);
>
> static ssize_t w100fb_reg_read(struct device *dev, struct
> device_attribute *attr, const char *buf, size_t count)
> {
> @@ -166,7 +166,7 @@ static ssize_t fastpllclk_store(struct device
> *dev, struct device_attribute *att
> return count;
> }
>
> -static DEVICE_ATTR(fastpllclk, 0644, fastpllclk_show,
> fastpllclk_store);
> +static DEVICE_ATTR_RW(fastpllclk);
>
> /*
> * Some touchscreens need hsync information from the video driver to
> diff --git a/lib/test_firmware.c b/lib/test_firmware.c
> index 64a4c76cba2b..964784dc1602 100644
> --- a/lib/test_firmware.c
> +++ b/lib/test_firmware.c
> @@ -359,7 +359,7 @@ static ssize_t config_name_show(struct device
> *dev,
> {
> return config_test_show_str(buf, test_fw_config->name);
> }
> -static DEVICE_ATTR(config_name, 0644, config_name_show,
> config_name_store);
> +static DEVICE_ATTR_RW(config_name);
>
> static ssize_t config_num_requests_store(struct device *dev,
> struct device_attribute
> *attr,
> @@ -388,8 +388,7 @@ static ssize_t config_num_requests_show(struct
> device *dev,
> {
> return test_dev_config_show_u8(buf, test_fw_config-
> >num_requests);
> }
> -static DEVICE_ATTR(config_num_requests, 0644,
> config_num_requests_show,
> - config_num_requests_store);
> +static DEVICE_ATTR_RW(config_num_requests);
>
> static ssize_t config_sync_direct_store(struct device *dev,
> struct device_attribute
> *attr,
> @@ -411,8 +410,7 @@ static ssize_t config_sync_direct_show(struct
> device *dev,
> {
> return test_dev_config_show_bool(buf, test_fw_config-
> >sync_direct);
> }
> -static DEVICE_ATTR(config_sync_direct, 0644,
> config_sync_direct_show,
> - config_sync_direct_store);
> +static DEVICE_ATTR_RW(config_sync_direct);
>
> static ssize_t config_send_uevent_store(struct device *dev,
> struct device_attribute
> *attr,
> @@ -428,8 +426,7 @@ static ssize_t config_send_uevent_show(struct
> device *dev,
> {
> return test_dev_config_show_bool(buf, test_fw_config-
> >send_uevent);
> }
> -static DEVICE_ATTR(config_send_uevent, 0644,
> config_send_uevent_show,
> - config_send_uevent_store);
> +static DEVICE_ATTR_RW(config_send_uevent);
>
> static ssize_t config_read_fw_idx_store(struct device *dev,
> struct device_attribute
> *attr,
> @@ -445,8 +442,7 @@ static ssize_t config_read_fw_idx_show(struct
> device *dev,
> {
> return test_dev_config_show_u8(buf, test_fw_config-
> >read_fw_idx);
> }
> -static DEVICE_ATTR(config_read_fw_idx, 0644,
> config_read_fw_idx_show,
> - config_read_fw_idx_store);
> +static DEVICE_ATTR_RW(config_read_fw_idx);
>
>
> static ssize_t trigger_request_store(struct device *dev,
> diff --git a/lib/test_kmod.c b/lib/test_kmod.c
> index 337f408b4de6..e372b97eee13 100644
> --- a/lib/test_kmod.c
> +++ b/lib/test_kmod.c
> @@ -694,8 +694,7 @@ static ssize_t config_test_driver_show(struct
> device *dev,
> return config_test_show_str(&test_dev->config_mutex, buf,
> config->test_driver);
> }
> -static DEVICE_ATTR(config_test_driver, 0644,
> config_test_driver_show,
> - config_test_driver_store);
> +static DEVICE_ATTR_RW(config_test_driver);
>
> static ssize_t config_test_fs_store(struct device *dev,
> struct device_attribute *attr,
> @@ -726,8 +725,7 @@ static ssize_t config_test_fs_show(struct device
> *dev,
> return config_test_show_str(&test_dev->config_mutex, buf,
> config->test_fs);
> }
> -static DEVICE_ATTR(config_test_fs, 0644, config_test_fs_show,
> - config_test_fs_store);
> +static DEVICE_ATTR_RW(config_test_fs);
>
> static int trigger_config_run_type(struct kmod_test_device
> *test_dev,
> enum kmod_test_case test_case,
> @@ -1012,8 +1010,7 @@ static ssize_t config_num_threads_show(struct
> device *dev,
>
> return test_dev_config_show_int(test_dev, buf, config-
> >num_threads);
> }
> -static DEVICE_ATTR(config_num_threads, 0644,
> config_num_threads_show,
> - config_num_threads_store);
> +static DEVICE_ATTR_RW(config_num_threads);
>
> static ssize_t config_test_case_store(struct device *dev,
> struct device_attribute *attr,
> @@ -1037,8 +1034,7 @@ static ssize_t config_test_case_show(struct
> device *dev,
>
> return test_dev_config_show_uint(test_dev, buf, config-
> >test_case);
> }
> -static DEVICE_ATTR(config_test_case, 0644, config_test_case_show,
> - config_test_case_store);
> +static DEVICE_ATTR_RW(config_test_case);
>
> static ssize_t test_result_show(struct device *dev,
> struct device_attribute *attr,
> @@ -1049,7 +1045,7 @@ static ssize_t test_result_show(struct device
> *dev,
>
> return test_dev_config_show_int(test_dev, buf, config-
> >test_result);
> }
> -static DEVICE_ATTR(test_result, 0644, test_result_show,
> test_result_store);
> +static DEVICE_ATTR_RW(test_result);
>
> #define TEST_KMOD_DEV_ATTR(name) &dev_attr_##name.att
> r
>
> diff --git a/sound/soc/omap/mcbsp.c b/sound/soc/omap/mcbsp.c
> index 7a54e3083203..79d4dc785e5c 100644
> --- a/sound/soc/omap/mcbsp.c
> +++ b/sound/soc/omap/mcbsp.c
> @@ -854,7 +854,7 @@ static ssize_t dma_op_mode_store(struct device
> *dev,
> return size;
> }
>
> -static DEVICE_ATTR(dma_op_mode, 0644, dma_op_mode_show,
> dma_op_mode_store);
> +static DEVICE_ATTR_RW(dma_op_mode);
>
> static const struct attribute *additional_attrs[] = {
> &dev_attr_max_tx_thres.attr,
> @@ -923,7 +923,7 @@ static ssize_t st_taps_store(struct device *dev,
> return size;
> }
>
> -static DEVICE_ATTR(st_taps, 0644, st_taps_show, st_taps_store);
> +static DEVICE_ATTR_RW(st_taps);
>
> static const struct attribute *sidetone_attrs[] = {
> &dev_attr_st_taps.attr,
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
^ permalink raw reply
* [PATCH v17 1/5] serdev: Make .remove in struct serdev_device_driver optional
From: Andrey Smirnov @ 2017-12-21 6:51 UTC (permalink / raw)
To: Lee Jones
Cc: Andrey Smirnov, linux-kernel, linux-serial, Rob Herring, cphealy,
Guenter Roeck, Lucas Stach, Nikita Yushchenko, Greg Kroah-Hartman,
Pavel Machek, Andy Shevchenko, Johan Hovold, Sebastian Reichel,
Philippe Ombredanne
In-Reply-To: <20171221065118.29726-1-andrew.smirnov@gmail.com>
Using devres infrastructure it is possible to write a serdev driver
that doesn't have any code that needs to be called as a part of
.remove. Add code to make .remove optional.
Cc: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: cphealy@gmail.com
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
drivers/tty/serdev/core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 1bef39828ca7..34050b439c1f 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -268,8 +268,8 @@ static int serdev_drv_probe(struct device *dev)
static int serdev_drv_remove(struct device *dev)
{
const struct serdev_device_driver *sdrv = to_serdev_device_driver(dev->driver);
-
- sdrv->remove(to_serdev_device(dev));
+ if (sdrv->remove)
+ sdrv->remove(to_serdev_device(dev));
return 0;
}
--
2.14.3
^ permalink raw reply related
* [PATCH v17 2/5] serdev: Introduce devm_serdev_device_open()
From: Andrey Smirnov @ 2017-12-21 6:51 UTC (permalink / raw)
To: Lee Jones
Cc: Andrey Smirnov, linux-kernel, linux-serial, Rob Herring, cphealy,
Guenter Roeck, Lucas Stach, Nikita Yushchenko, Greg Kroah-Hartman,
Pavel Machek, Andy Shevchenko, Johan Hovold, Sebastian Reichel,
Philippe Ombredanne
In-Reply-To: <20171221065118.29726-1-andrew.smirnov@gmail.com>
Add code implementing managed version of serdev_device_open() for
serdev device drivers that "open" the device during driver's lifecycle
only once (e.g. opened in .probe() and closed in .remove()).
Cc: linux-kernel@vger.kernel.org
Cc: linux-serial@vger.kernel.org
Cc: Rob Herring <robh@kernel.org>
Cc: cphealy@gmail.com
Cc: Guenter Roeck <linux@roeck-us.net>
Cc: Lucas Stach <l.stach@pengutronix.de>
Cc: Nikita Yushchenko <nikita.yoush@cogentembedded.com>
Cc: Lee Jones <lee.jones@linaro.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: Johan Hovold <johan@kernel.org>
Cc: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Cc: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Philippe Ombredanne <pombredanne@nexb.com>
Acked-by: Pavel Machek <pavel@ucw.cz>
Acked-by: Rob Herring <robh@kernel.org>
Reviewed-by: Sebastian Reichel <sebastian.reichel@collabora.co.uk>
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Andrey Smirnov <andrew.smirnov@gmail.com>
---
Documentation/driver-model/devres.txt | 3 +++
drivers/tty/serdev/core.c | 27 +++++++++++++++++++++++++++
include/linux/serdev.h | 1 +
3 files changed, 31 insertions(+)
diff --git a/Documentation/driver-model/devres.txt b/Documentation/driver-model/devres.txt
index c180045eb43b..7c1bb3d0c222 100644
--- a/Documentation/driver-model/devres.txt
+++ b/Documentation/driver-model/devres.txt
@@ -384,6 +384,9 @@ RESET
devm_reset_control_get()
devm_reset_controller_register()
+SERDEV
+ devm_serdev_device_open()
+
SLAVE DMA ENGINE
devm_acpi_dma_controller_register()
diff --git a/drivers/tty/serdev/core.c b/drivers/tty/serdev/core.c
index 34050b439c1f..28133dbd2808 100644
--- a/drivers/tty/serdev/core.c
+++ b/drivers/tty/serdev/core.c
@@ -132,6 +132,33 @@ void serdev_device_close(struct serdev_device *serdev)
}
EXPORT_SYMBOL_GPL(serdev_device_close);
+static void devm_serdev_device_release(struct device *dev, void *dr)
+{
+ serdev_device_close(*(struct serdev_device **)dr);
+}
+
+int devm_serdev_device_open(struct device *dev, struct serdev_device *serdev)
+{
+ struct serdev_device **dr;
+ int ret;
+
+ dr = devres_alloc(devm_serdev_device_release, sizeof(*dr), GFP_KERNEL);
+ if (!dr)
+ return -ENOMEM;
+
+ ret = serdev_device_open(serdev);
+ if (ret) {
+ devres_free(dr);
+ return ret;
+ }
+
+ *dr = serdev;
+ devres_add(dev, dr);
+
+ return 0;
+}
+EXPORT_SYMBOL_GPL(devm_serdev_device_open);
+
void serdev_device_write_wakeup(struct serdev_device *serdev)
{
complete(&serdev->write_comp);
diff --git a/include/linux/serdev.h b/include/linux/serdev.h
index e69402d4a8ae..9929063bd45d 100644
--- a/include/linux/serdev.h
+++ b/include/linux/serdev.h
@@ -193,6 +193,7 @@ static inline int serdev_controller_receive_buf(struct serdev_controller *ctrl,
int serdev_device_open(struct serdev_device *);
void serdev_device_close(struct serdev_device *);
+int devm_serdev_device_open(struct device *, struct serdev_device *);
unsigned int serdev_device_set_baudrate(struct serdev_device *, unsigned int);
void serdev_device_set_flow_control(struct serdev_device *, bool);
int serdev_device_write_buf(struct serdev_device *, const unsigned char *, size_t);
--
2.14.3
^ permalink raw reply related
* Re: INFO: rcu detected stall in n_tty_ioctl
From: Andy Shevchenko @ 2017-12-21 15:35 UTC (permalink / raw)
To: syzbot, Alexey.Brodkin, david, eric, gregkh, jan.kiszka, jslaby,
linux-kernel, linux-serial, phil, rafael.gago, sean.wang,
syzkaller-bugs, tomas.melin
In-Reply-To: <001a113f542a3da6f10560c84350@google.com>
On Wed, 2017-12-20 at 08:42 -0800, syzbot wrote:
> Hello,
>
> syzkaller hit the following crash on
> 82bcf1def3b5f1251177ad47c44f7e17af039b4b
> git://git.cmpxchg.org/linux-mmots.git/master
> compiler: gcc (GCC) 7.1.1 20170620
> .config is attached
> Raw console output is attached.
>
> Unfortunately, I don't have any reproducer for this bug yet.
>
>
> device gre0 entered promiscuous mode
> INFO: rcu_sched self-detected stall on CPU
> INFO: rcu_sched detected stalls on CPUs/tasks:
> 0-....: (125000 ticks this GP) idle=40e/1/4611686018427387906
> softirq=15450/15450 fqs=31230
> (detected by 1, t=125002 jiffies, g=8122, c=8121, q=540)
> Sending NMI from CPU 1 to CPUs 0:
> NMI backtrace for cpu 0
> CPU: 0 PID: 5998 Comm: syz-executor3 Not tainted 4.15.0-rc2-mm1+ #39
> Hardware name: Google Google Compute Engine/Google Compute Engine,
> BIOS
> Google 01/01/2011
> RIP: 0010:inb arch/x86/include/asm/io.h:348 [inline]
> RIP: 0010:io_serial_in+0x6b/0x90
> drivers/tty/serial/8250/8250_port.c:434
> RSP: 0018:ffff8801db206ff8 EFLAGS: 00000002
> RAX: dffffc0000000000 RBX: 00000000000003fd RCX: 0000000000000000
> RDX: 00000000000003fd RSI: 0000000000000005 RDI: ffffffff880f6980
> RBP: ffff8801db207008 R08: ffff8801db206b88 R09: ffff8801c00c4540
> R10: 000000000000000b R11: ffffed003b640d73 R12: ffffffff880f6940
> R13: 0000000000000020 R14: fffffbfff101ed6f R15: fffffbfff101ed32
> FS: 00007efcfdd21700(0000) GS:ffff8801db200000(0000)
> knlGS:0000000000000000
> CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
> CR2: 00007f180504d000 CR3: 00000001ac67d002 CR4: 00000000001606f0
> DR0: 0000000020000000 DR1: 0000000000000000 DR2: 0000000000000000
> DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000600
> Call Trace:
> <IRQ>
> serial_in drivers/tty/serial/8250/8250.h:111 [inline]
> wait_for_xmitr+0x93/0x1e0 drivers/tty/serial/8250/8250_port.c:2033
Here we are testing LSR register for a THRE bit to be set and it seems
by some reason we end up in a back trace in IO.
KVM side effect of some change there?
> serial8250_console_putchar+0x1f/0x60
> drivers/tty/serial/8250/8250_port.c:3170
> uart_console_write+0xac/0xe0 drivers/tty/serial/serial_core.c:1858
> serial8250_console_write+0x647/0xa20
> drivers/tty/serial/8250/8250_port.c:3236
> univ8250_console_write+0x5f/0x70
> drivers/tty/serial/8250/8250_core.c:590
> call_console_drivers kernel/printk/printk.c:1574 [inline]
> console_unlock+0x788/0xd70 kernel/printk/printk.c:2233
> vprintk_emit+0x4ad/0x590 kernel/printk/printk.c:1757
> vprintk_default+0x28/0x30 kernel/printk/printk.c:1796
> vprintk_func+0x57/0xc0 kernel/printk/printk_safe.c:379
> printk+0xaa/0xca kernel/printk/printk.c:1829
> print_cpu_stall_info_begin kernel/rcu/tree_plugin.h:1685 [inline]
> print_cpu_stall kernel/rcu/tree.c:1510 [inline]
> check_cpu_stall.isra.65+0x845/0x15b0 kernel/rcu/tree.c:1592
> __rcu_pending kernel/rcu/tree.c:3362 [inline]
> rcu_pending kernel/rcu/tree.c:3424 [inline]
> rcu_check_callbacks+0x238/0xd20 kernel/rcu/tree.c:2764
> update_process_times+0x30/0x60 kernel/time/timer.c:1630
> tick_sched_handle+0x85/0x160 kernel/time/tick-sched.c:162
> tick_sched_timer+0x42/0x120 kernel/time/tick-sched.c:1148
> __run_hrtimer kernel/time/hrtimer.c:1211 [inline]
> __hrtimer_run_queues+0x349/0xe10 kernel/time/hrtimer.c:1275
> hrtimer_interrupt+0x1d4/0x5f0 kernel/time/hrtimer.c:1309
> local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
> smp_apic_timer_interrupt+0x14a/0x700
> arch/x86/kernel/apic/apic.c:1050
> apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
> </IRQ>
> RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x50 kernel/kcov.c:94
> RSP: 0018:ffff8801c0ff7b38 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff11
> RAX: ffff8801c00c4540 RBX: ffffc90001329060 RCX: ffffffff8286efc6
> RDX: 0000000000010000 RSI: ffffc900021f9000 RDI: ffffc9000132a260
> RBP: ffff8801c0ff7b38 R08: 0000000000000000 R09: 0000000000000000
> R10: 1ffff100381fee80 R11: ffffed00381feeb5 R12: ffffc90001328000
> R13: 000000041fbe821b R14: 0000000020520ffc R15: ffff8801c08fe338
> inq_canon drivers/tty/n_tty.c:2409 [inline]
> n_tty_ioctl+0x20c/0x2d0 drivers/tty/n_tty.c:2429
> tty_ioctl+0x32e/0x1600 drivers/tty/tty_io.c:2638
> vfs_ioctl fs/ioctl.c:46 [inline]
> do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686
> SYSC_ioctl fs/ioctl.c:701 [inline]
> SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
> entry_SYSCALL_64_fastpath+0x1f/0x96
> RIP: 0033:0x452a09
> RSP: 002b:00007efcfdd20c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452a09
> RDX: 0000000020520ffc RSI: 000000000000541b RDI: 0000000000000015
> RBP: 00000000000001bf R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006efa88
> R13: 00000000ffffffff R14: 00007efcfdd216d4 R15: 0000000000000000
> Code: 24 d9 00 00 00 49 8d 7c 24 40 48 b8 00 00 00 00 00 fc ff df 48
> 89 fa
> 48 c1 ea 03 d3 e3 80 3c 02 00 75 17 41 03 5c 24 40 89 da ec <5b> 0f b6
> c0
> 41 5c 5d c3 e8 88 b0 18 ff eb c2 e8 e1 b0 18 ff eb
> 0-....: (125000 ticks this GP) idle=40e/1/4611686018427387906
> softirq=15450/15450 fqs=31396
> (t=125675 jiffies g=8122 c=8121 q=540)
> NMI backtrace for cpu 0
> CPU: 0 PID: 5998 Comm: syz-executor3 Not tainted 4.15.0-rc2-mm1+ #39
> Hardware name: Google Google Compute Engine/Google Compute Engine,
> BIOS
> Google 01/01/2011
> Call Trace:
> <IRQ>
> __dump_stack lib/dump_stack.c:17 [inline]
> dump_stack+0x194/0x257 lib/dump_stack.c:53
> nmi_cpu_backtrace+0x1d2/0x210 lib/nmi_backtrace.c:103
> nmi_trigger_cpumask_backtrace+0x122/0x180 lib/nmi_backtrace.c:62
> arch_trigger_cpumask_backtrace+0x14/0x20
> arch/x86/kernel/apic/hw_nmi.c:38
> trigger_single_cpu_backtrace include/linux/nmi.h:156 [inline]
> rcu_dump_cpu_stacks+0x186/0x1da kernel/rcu/tree.c:1375
> print_cpu_stall kernel/rcu/tree.c:1524 [inline]
> check_cpu_stall.isra.65+0xbb8/0x15b0 kernel/rcu/tree.c:1592
> __rcu_pending kernel/rcu/tree.c:3362 [inline]
> rcu_pending kernel/rcu/tree.c:3424 [inline]
> rcu_check_callbacks+0x238/0xd20 kernel/rcu/tree.c:2764
> update_process_times+0x30/0x60 kernel/time/timer.c:1630
> tick_sched_handle+0x85/0x160 kernel/time/tick-sched.c:162
> tick_sched_timer+0x42/0x120 kernel/time/tick-sched.c:1148
> __run_hrtimer kernel/time/hrtimer.c:1211 [inline]
> __hrtimer_run_queues+0x349/0xe10 kernel/time/hrtimer.c:1275
> hrtimer_interrupt+0x1d4/0x5f0 kernel/time/hrtimer.c:1309
> local_apic_timer_interrupt arch/x86/kernel/apic/apic.c:1025 [inline]
> smp_apic_timer_interrupt+0x14a/0x700
> arch/x86/kernel/apic/apic.c:1050
> apic_timer_interrupt+0xa9/0xb0 arch/x86/entry/entry_64.S:920
> </IRQ>
> RIP: 0010:__sanitizer_cov_trace_pc+0xd/0x50 kernel/kcov.c:94
> RSP: 0018:ffff8801c0ff7b38 EFLAGS: 00000293 ORIG_RAX: ffffffffffffff11
> RAX: ffff8801c00c4540 RBX: ffffc90001329060 RCX: ffffffff8286efc6
> RDX: 0000000000010000 RSI: ffffc900021f9000 RDI: ffffc9000132a260
> RBP: ffff8801c0ff7b38 R08: 0000000000000000 R09: 0000000000000000
> R10: 1ffff100381fee80 R11: ffffed00381feeb5 R12: ffffc90001328000
> R13: 000000041fbe821b R14: 0000000020520ffc R15: ffff8801c08fe338
> inq_canon drivers/tty/n_tty.c:2409 [inline]
> n_tty_ioctl+0x20c/0x2d0 drivers/tty/n_tty.c:2429
> tty_ioctl+0x32e/0x1600 drivers/tty/tty_io.c:2638
> vfs_ioctl fs/ioctl.c:46 [inline]
> do_vfs_ioctl+0x1b1/0x1530 fs/ioctl.c:686
> SYSC_ioctl fs/ioctl.c:701 [inline]
> SyS_ioctl+0x8f/0xc0 fs/ioctl.c:692
> entry_SYSCALL_64_fastpath+0x1f/0x96
> RIP: 0033:0x452a09
> RSP: 002b:00007efcfdd20c58 EFLAGS: 00000212 ORIG_RAX: 0000000000000010
> RAX: ffffffffffffffda RBX: 000000000071bea0 RCX: 0000000000452a09
> RDX: 0000000020520ffc RSI: 000000000000541b RDI: 0000000000000015
> RBP: 00000000000001bf R08: 0000000000000000 R09: 0000000000000000
> R10: 0000000000000000 R11: 0000000000000212 R12: 00000000006efa88
> R13: 00000000ffffffff R14: 00007efcfdd216d4 R15: 0000000000000000
>
--
Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Intel Finland Oy
^ permalink raw reply
* Re: [PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
From: Greentime Hu @ 2017-12-22 14:38 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Greentime, Linux Kernel Mailing List, Arnd Bergmann,
linux-arch, Thomas Gleixner, Jason Cooper, Marc Zyngier,
Rob Herring, netdev, Vincent Chen, DTML, Al Viro, David Howells,
Will Deacon, Daniel Lezcano, linux-serial, Geert Uytterhoeven,
Linus Walleij, Mark Rutland, Greg
In-Reply-To: <201712201836.XDtv2JdK%fengguang.wu@intel.com>
2017-12-20 18:09 GMT+08:00 kbuild test robot <lkp@intel.com>:
> Hi Greentime,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on tip/timers/core]
> [also build test ERROR on v4.15-rc4 next-20171220]
> [cannot apply to linus/master]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
> config: sparc-defconfig (attached as .config)
> compiler: sparc-linux-gcc (GCC) 7.2.0
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=sparc
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
>>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
> void __iomem *ioremap(unsigned long offset, unsigned long size);
> ^~~~~~~
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
> void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
> ^~~~~~~
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
> #define ioremap_nocache(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> include/asm-generic/io.h:865:0: note: this is the location of the previous definition
> #define ioremap_nocache ioremap_nocache
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
> #define ioremap_wc(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> include/asm-generic/io.h:881:0: note: this is the location of the previous definition
> #define ioremap_wc ioremap_wc
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
> #define ioremap_wt(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from arch/sparc/kernel/kernel.h:4,
> from arch/sparc/kernel/traps_32.c:30:
> include/asm-generic/io.h:889:0: note: this is the location of the previous definition
> #define ioremap_wt ioremap_wt
>
> cc1: all warnings being treated as errors
> --
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
>>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
> void __iomem *ioremap(unsigned long offset, unsigned long size);
> ^~~~~~~
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
> void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
> ^~~~~~~
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
> #define ioremap_nocache(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> include/asm-generic/io.h:865:0: note: this is the location of the previous definition
> #define ioremap_nocache ioremap_nocache
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
> #define ioremap_wc(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> include/asm-generic/io.h:881:0: note: this is the location of the previous definition
> #define ioremap_wc ioremap_wc
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
> #define ioremap_wt(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> include/asm-generic/io.h:889:0: note: this is the location of the previous definition
> #define ioremap_wt ioremap_wt
>
>>> arch/sparc/kernel/ioport.c:124:15: error: conflicting types for 'ioremap'
> void __iomem *ioremap(unsigned long offset, unsigned long size)
> ^~~~~~~
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
> void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
> ^~~~~~~
> In file included from include/linux/linkage.h:6:0,
> from include/linux/kernel.h:6,
> from include/linux/list.h:8,
> from include/linux/module.h:9,
> from arch/sparc/kernel/ioport.c:28:
> arch/sparc/kernel/ioport.c:131:15: error: conflicting types for 'ioremap'
> EXPORT_SYMBOL(ioremap);
> ^
> include/linux/export.h:65:21: note: in definition of macro '___EXPORT_SYMBOL'
> extern typeof(sym) sym; \
> ^~~
>>> arch/sparc/kernel/ioport.c:131:1: note: in expansion of macro 'EXPORT_SYMBOL'
> EXPORT_SYMBOL(ioremap);
> ^~~~~~~~~~~~~
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc/kernel/ioport.c:36:
> include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
> void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
> ^~~~~~~
> cc1: all warnings being treated as errors
> --
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
>>> arch/sparc/include/asm/io_32.h:129:15: error: conflicting types for 'ioremap'
> void __iomem *ioremap(unsigned long offset, unsigned long size);
> ^~~~~~~
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
> void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
> ^~~~~~~
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> arch/sparc/include/asm/io_32.h:130:0: error: "ioremap_nocache" redefined [-Werror]
> #define ioremap_nocache(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> include/asm-generic/io.h:865:0: note: this is the location of the previous definition
> #define ioremap_nocache ioremap_nocache
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> arch/sparc/include/asm/io_32.h:131:0: error: "ioremap_wc" redefined [-Werror]
> #define ioremap_wc(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> include/asm-generic/io.h:881:0: note: this is the location of the previous definition
> #define ioremap_wc ioremap_wc
>
> In file included from arch/sparc/include/asm/io.h:6:0,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> arch/sparc/include/asm/io_32.h:132:0: error: "ioremap_wt" redefined [-Werror]
> #define ioremap_wt(X,Y) ioremap((X),(Y))
>
> In file included from arch/sparc/include/asm/io_32.h:13:0,
> from arch/sparc/include/asm/io.h:6,
> from include/linux/io.h:25,
> from include/linux/irq.h:24,
> from include/asm-generic/hardirq.h:12,
> from arch/sparc/include/asm/hardirq_32.h:10,
> from arch/sparc/include/asm/hardirq.h:6,
> from include/linux/hardirq.h:8,
> from include/linux/interrupt.h:12,
> from include/linux/pci.h:31,
> from arch/sparc//kernel/ioport.c:36:
> include/asm-generic/io.h:889:0: note: this is the location of the previous definition
> #define ioremap_wt ioremap_wt
>
> arch/sparc//kernel/ioport.c:124:15: error: conflicting types for 'ioremap'
> void __iomem *ioremap(unsigned long offset, unsigned long size)
> ^~~~~~~
>
Hi, all:
I just tried to fix this build error.
Should I send this patch next time with nds32 patchset?
--- a/arch/sparc/include/asm/io_32.h
+++ b/arch/sparc/include/asm/io_32.h
@@ -126,12 +126,7 @@ static inline void sbus_memcpy_toio(volatile void
__iomem *dst,
* Bus number may be embedded in the higher bits of the physical address.
* This is why we have no bus number argument to ioremap().
*/
-void __iomem *ioremap(unsigned long offset, unsigned long size);
-#define ioremap_nocache(X,Y) ioremap((X),(Y))
-#define ioremap_wc(X,Y) ioremap((X),(Y))
-#define ioremap_wt(X,Y) ioremap((X),(Y))
void iounmap(volatile void __iomem *addr);
-
/* Create a virtual mapping cookie for an IO port range */
void __iomem *ioport_map(unsigned long port, unsigned int nr);
void ioport_unmap(void __iomem *);
diff --git a/arch/sparc/kernel/ioport.c b/arch/sparc/kernel/ioport.c
index 12894f2..9cdeb54 100644
--- a/arch/sparc/kernel/ioport.c
+++ b/arch/sparc/kernel/ioport.c
@@ -121,12 +121,12 @@ static void xres_free(struct xresource *xrp) {
*
* Bus type is always zero on IIep.
*/
-void __iomem *ioremap(unsigned long offset, unsigned long size)
+void __iomem *ioremap(phys_addr_t offset, size_t size)
{
char name[14];
sprintf(name, "phys_%08x", (u32)offset);
- return _sparc_alloc_io(0, offset, size, name);
+ return _sparc_alloc_io(0, (unsigned long)offset, size, name);
}
EXPORT_SYMBOL(ioremap);
^ permalink raw reply related
* Re: [PATCH v4 01/36] asm-generic/io.h: move ioremap_nocache/ioremap_uc/ioremap_wc/ioremap_wt out of ifndef CONFIG_MMU
From: Greentime Hu @ 2017-12-22 14:40 UTC (permalink / raw)
To: kbuild test robot
Cc: kbuild-all, Greentime, Linux Kernel Mailing List, Arnd Bergmann,
linux-arch, Thomas Gleixner, Jason Cooper, Marc Zyngier,
Rob Herring, netdev, Vincent Chen, DTML, Al Viro, David Howells,
Will Deacon, Daniel Lezcano, linux-serial, Geert Uytterhoeven,
Linus Walleij, Mark Rutland, Greg
In-Reply-To: <201712201748.C4nCizdE%fengguang.wu@intel.com>
2017-12-20 18:10 GMT+08:00 kbuild test robot <lkp@intel.com>:
> Hi Greentime,
>
> Thank you for the patch! Yet something to improve:
>
> [auto build test ERROR on tip/timers/core]
> [also build test ERROR on v4.15-rc4 next-20171220]
> [cannot apply to linus/master]
> [if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
>
> url: https://github.com/0day-ci/linux/commits/Greentime-Hu/Andes-nds32-Linux-Kernel/20171220-155937
> config: openrisc-or1ksim_defconfig (attached as .config)
> compiler: or1k-linux-gcc (GCC) 6.0.0 20160327 (experimental)
> reproduce:
> wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
> chmod +x ~/bin/make.cross
> # save the attached .config to linux build tree
> make.cross ARCH=openrisc
>
> All error/warnings (new ones prefixed by >>):
>
> In file included from include/linux/io.h:25:0,
> from arch/openrisc/kernel/asm-offsets.c:35:
>>> arch/openrisc/include/asm/io.h:38:29: error: conflicting types for 'ioremap'
> static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
> ^~~~~~~
> In file included from arch/openrisc/include/asm/io.h:32:0,
> from include/linux/io.h:25,
> from arch/openrisc/kernel/asm-offsets.c:35:
> include/asm-generic/io.h:864:15: note: previous declaration of 'ioremap' was here
> void __iomem *ioremap(phys_addr_t phys_addr, size_t size);
> ^~~~~~~
> include/asm-generic/io.h:865:25: error: conflicting types for 'ioremap_nocache'
> #define ioremap_nocache ioremap_nocache
> ^
>>> arch/openrisc/include/asm/io.h:44:29: note: in expansion of macro 'ioremap_nocache'
> static inline void __iomem *ioremap_nocache(phys_addr_t offset,
> ^~~~~~~~~~~~~~~
> include/asm-generic/io.h:865:25: note: previous definition of 'ioremap_nocache' was here
> #define ioremap_nocache ioremap_nocache
> ^
> include/asm-generic/io.h:866:29: note: in expansion of macro 'ioremap_nocache'
> static inline void __iomem *ioremap_nocache(phys_addr_t offset, size_t size)
> ^~~~~~~~~~~~~~~
> make[2]: *** [arch/openrisc/kernel/asm-offsets.s] Error 1
> make[2]: Target '__build' not remade because of errors.
> make[1]: *** [prepare0] Error 2
> make[1]: Target 'prepare' not remade because of errors.
> make: *** [sub-make] Error 2
>
> vim +/ioremap +38 arch/openrisc/include/asm/io.h
>
> 58e0166a Jonas Bonn 2011-06-04 31
> 58e0166a Jonas Bonn 2011-06-04 @32 #include <asm-generic/io.h>
> 9b04ebd1 James Hogan 2012-10-23 33 #include <asm/pgtable.h>
> 58e0166a Jonas Bonn 2011-06-04 34
> 58e0166a Jonas Bonn 2011-06-04 35 extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
> 58e0166a Jonas Bonn 2011-06-04 36 pgprot_t prot);
> 58e0166a Jonas Bonn 2011-06-04 37
> 58e0166a Jonas Bonn 2011-06-04 @38 static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
> 58e0166a Jonas Bonn 2011-06-04 39 {
> 58e0166a Jonas Bonn 2011-06-04 40 return __ioremap(offset, size, PAGE_KERNEL);
> 58e0166a Jonas Bonn 2011-06-04 41 }
> 58e0166a Jonas Bonn 2011-06-04 42
> 58e0166a Jonas Bonn 2011-06-04 43 /* #define _PAGE_CI 0x002 */
> 58e0166a Jonas Bonn 2011-06-04 @44 static inline void __iomem *ioremap_nocache(phys_addr_t offset,
> 58e0166a Jonas Bonn 2011-06-04 45 unsigned long size)
> 58e0166a Jonas Bonn 2011-06-04 46 {
> 58e0166a Jonas Bonn 2011-06-04 47 return __ioremap(offset, size,
> 58e0166a Jonas Bonn 2011-06-04 48 __pgprot(pgprot_val(PAGE_KERNEL) | _PAGE_CI));
> 58e0166a Jonas Bonn 2011-06-04 49 }
> 58e0166a Jonas Bonn 2011-06-04 50
>
> :::::: The code at line 38 was first introduced by commit
> :::::: 58e0166a4772aaeb10c9b0f6d59f19099d2047df OpenRISC: Headers
>
> :::::: TO: Jonas Bonn <jonas@southpole.se>
> :::::: CC: Jonas Bonn <jonas@southpole.se>
>
> ---
> 0-DAY kernel test infrastructure Open Source Technology Center
> https://lists.01.org/pipermail/kbuild-all Intel Corporation
Hi, all:
I just tried to fix this build error.
Should I send this patch next time with nds32 patchset?
--- a/arch/openrisc/include/asm/io.h
+++ b/arch/openrisc/include/asm/io.h
@@ -29,13 +29,14 @@
#define PIO_OFFSET 0
#define PIO_MASK 0
+#define ioremap_nocache ioremap_nocache
#include <asm-generic/io.h>
#include <asm/pgtable.h>
extern void __iomem *__ioremap(phys_addr_t offset, unsigned long size,
pgprot_t prot);
-static inline void __iomem *ioremap(phys_addr_t offset, unsigned long size)
+static inline void __iomem *ioremap(phys_addr_t offset, size_t size)
{
return __ioremap(offset, size, PAGE_KERNEL);
}
^ permalink raw reply
* [PATCH] gpio: serial: max310x: Support open-drain configuration for GPIOs
From: Jan Kundrát @ 2017-12-22 20:29 UTC (permalink / raw)
To: linux-gpio
Cc: Greg Kroah-Hartman, linux-serial, Alexander Shiyan, Linus Walleij
The push-pull vs. open-drain are the only supported output modes. The
inputs are always unconditionally equipped with weak pull-downs. That's
the only mode, so there's probably no point in exporting that. I wonder
if it's worthwhile to provide a custom dbg_show method to indicate the
current status of the outputs, though.
This patch and [1] for i2c-gpio together make it possible to bit-bang an
I2C bus over GPIOs of an UART which is connected via SPI :). Yes, this
is crazy, but it's fast enough (while on a 26Mhz SPI HW bus with a
dual-core 1.6GHz CPU) to drive an I2C bus at 200kHz, according to my
scope.
[1] https://patchwork.ozlabs.org/patch/852591/
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
---
My suggestion is for this patch to go in via the tty/serial tree; I plan
to send more patches to this driver (and some of them are alreay in
tty-next). --jkt
---
drivers/tty/serial/max310x.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index d0e55f8456a5..c44387d0625a 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1187,6 +1187,27 @@ static int max310x_gpio_direction_output(struct gpio_chip *chip,
return 0;
}
+static int max310x_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
+ unsigned long config)
+{
+ struct max310x_port *s = gpiochip_get_data(chip);
+ struct uart_port *port = &s->p[offset / 4].port;
+
+ switch (pinconf_to_config_param(config)) {
+ case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+ max310x_port_update(port, MAX310X_GPIOCFG_REG,
+ 1 << ((offset % 4) + 4),
+ 1 << ((offset % 4) + 4));
+ return 0;
+ case PIN_CONFIG_DRIVE_PUSH_PULL:
+ max310x_port_update(port, MAX310X_GPIOCFG_REG,
+ 1 << ((offset % 4) + 4), 0);
+ return 0;
+ default:
+ return -ENOTSUPP;
+ }
+}
+
static void max310x_gpio_irq_mask(struct irq_data *d)
{
struct gpio_chip *gc = irq_data_get_irq_chip_data(d);
@@ -1426,6 +1447,7 @@ static int max310x_probe(struct device *dev, struct max310x_devtype *devtype,
s->gpio.get = max310x_gpio_get;
s->gpio.direction_output= max310x_gpio_direction_output;
s->gpio.set = max310x_gpio_set;
+ s->gpio.set_config = max310x_gpio_set_config;
s->gpio.base = -1;
s->gpio.ngpio = devtype->nr * 4;
s->gpio.can_sleep = 1;
--
2.14.3
^ permalink raw reply related
* [PATCH v2] gpio: serial: max310x: Support open-drain configuration for GPIOs
From: Jan Kundrát @ 2017-12-22 20:29 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux-serial, linux-gpio, Alexander Shiyan, Linus Walleij
In-Reply-To: <20180109153721.GA17957@kroah.com>
The push-pull vs. open-drain are the only supported output modes. The
inputs are always unconditionally equipped with weak pull-downs. That's
the only mode, so there's probably no point in exporting that. I wonder
if it's worthwhile to provide a custom dbg_show method to indicate the
current status of the outputs, though.
This patch and [1] for i2c-gpio together make it possible to bit-bang an
I2C bus over GPIOs of an UART which is connected via SPI :). Yes, this
is crazy, but it's fast enough (while on a 26Mhz SPI HW bus with a
dual-core 1.6GHz CPU) to drive an I2C bus at 200kHz, according to my
scope.
[1] https://patchwork.ozlabs.org/patch/852591/
Signed-off-by: Jan Kundrát <jan.kundrat@cesnet.cz>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
---
drivers/tty/serial/max310x.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)
diff --git a/drivers/tty/serial/max310x.c b/drivers/tty/serial/max310x.c
index 97576ff791db..39f635812077 100644
--- a/drivers/tty/serial/max310x.c
+++ b/drivers/tty/serial/max310x.c
@@ -1159,6 +1159,27 @@ static int max310x_gpio_direction_output(struct gpio_chip *chip,
return 0;
}
+
+static int max310x_gpio_set_config(struct gpio_chip *chip, unsigned int offset,
+ unsigned long config)
+{
+ struct max310x_port *s = gpiochip_get_data(chip);
+ struct uart_port *port = &s->p[offset / 4].port;
+
+ switch (pinconf_to_config_param(config)) {
+ case PIN_CONFIG_DRIVE_OPEN_DRAIN:
+ max310x_port_update(port, MAX310X_GPIOCFG_REG,
+ 1 << ((offset % 4) + 4),
+ 1 << ((offset % 4) + 4));
+ return 0;
+ case PIN_CONFIG_DRIVE_PUSH_PULL:
+ max310x_port_update(port, MAX310X_GPIOCFG_REG,
+ 1 << ((offset % 4) + 4), 0);
+ return 0;
+ default:
+ return -ENOTSUPP;
+ }
+}
#endif
static int max310x_probe(struct device *dev, struct max310x_devtype *devtype,
@@ -1302,6 +1323,7 @@ static int max310x_probe(struct device *dev, struct max310x_devtype *devtype,
s->gpio.get = max310x_gpio_get;
s->gpio.direction_output= max310x_gpio_direction_output;
s->gpio.set = max310x_gpio_set;
+ s->gpio.set_config = max310x_gpio_set_config;
s->gpio.base = -1;
s->gpio.ngpio = devtype->nr * 4;
s->gpio.can_sleep = 1;
--
2.14.3
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox