Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1508412
| From | David Lechner <david@lechnology.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver |
| Date | 2016-10-25 18:20 +0200 |
| Message-ID | <swcCe-7Zv-19@gated-at.bofh.it> (permalink) |
| References | <svQBH-1Ks-3@gated-at.bofh.it> <svQBH-1Ks-17@gated-at.bofh.it> <svXWx-6B7-3@gated-at.bofh.it> <sw4EF-2zg-13@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On 10/25/2016 02:39 AM, Axel Haslam wrote: > On Tue, Oct 25, 2016 at 2:38 AM, David Lechner <david@lechnology.com> wrote: >> On 10/24/2016 11:46 AM, ahaslam@baylibre.com wrote: >>> >>> -#ifndef CONFIG_ARCH_DAVINCI_DA8XX >>> -#error "This file is DA8xx bus glue. Define CONFIG_ARCH_DAVINCI_DA8XX." >>> -#endif >>> +#include "ohci.h" >>> + >>> +#define DRIVER_DESC "OHCI DA8XX driver" >>> + >>> +static const char hcd_name[] = "ohci-da8xx"; >> >> >> why static const char instead of #define? This is only used one time in a >> pr_info, so it seems kind of pointless anyway. > > Other drivers are using static const for the same variable. > i think static const is preferred over #define because #define doet give a type. > If you dont mind ill keep it static const. > If this string was used in this file more than one place, I would agree with you, but currently it is only used as the argument of a pr_info(). The string "ohci-da8xx" could just be included in the fmt string instead of using "%s".
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver ahaslam@baylibre.com - 2016-10-24 18:50 +0200
Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver David Lechner <david@lechnology.com> - 2016-10-25 02:40 +0200
Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver Axel Haslam <ahaslam@baylibre.com> - 2016-10-25 09:50 +0200
Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver David Lechner <david@lechnology.com> - 2016-10-25 18:20 +0200
Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver David Lechner <david@lechnology.com> - 2016-10-25 18:30 +0200
Re: [PATCH/RFT v2 11/17] USB: OHCI: make ohci-da8xx a separate driver Axel Haslam <ahaslam@baylibre.com> - 2016-10-25 18:30 +0200
csiph-web