Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433090

Re: RFC: out-of-tree tty driver breakage (changing ASYNC_ bits)

Path csiph.com!news.mixmin.net!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod
From Grant Edwards <grant.b.edwards@gmail.com>
Newsgroups linux.kernel
Subject Re: RFC: out-of-tree tty driver breakage (changing ASYNC_ bits)
Date Tue, 28 Jun 2016 18:10:01 +0200
Message-ID <rP3Kh-Rj-21@gated-at.bofh.it> (permalink)
References <qPw26-1mc-11@gated-at.bofh.it> <qPCAy-5OS-9@gated-at.bofh.it> <qPN2W-4pP-31@gated-at.bofh.it> <qPNvY-4Q9-19@gated-at.bofh.it> <rP3qV-uu-17@gated-at.bofh.it> <rP3AB-ys-5@gated-at.bofh.it>
X-Injected-Via-Gmane http://gmane.org/
Lines 51
X-Gmane-NNTP-Posting-Host 67-130-15-94.dia.static.qwest.net
User-Agent slrn/1.0.2 (Linux)
Sender robomod@news.nic.it
List-ID <linux-kernel.vger.kernel.org>
X-Mailing-List linux-kernel@vger.kernel.org
Approved robomod@news.nic.it
Organization linux.* mail to news gateway
X-Original-Cc linux-serial@vger.kernel.org
X-Original-Date Tue, 28 Jun 2016 16:05:33 +0000 (UTC)
X-Original-Message-ID <nku78d$mru$1@ger.gmane.org>
X-Original-References <5692D054.7050203@hurleysoftware.com> <20160111044204.GB12741@kroah.com> <n70j5g$sem$1@ger.gmane.org> <5693D72D.6050501@hurleysoftware.com> <nku5nh$1n3$1@ger.gmane.org> <nku6k9$1n3$2@ger.gmane.org>
X-Original-Sender linux-kernel-owner@vger.kernel.org
X-Original-X-Complaints-To usenet@ger.gmane.org
Xref csiph.com linux.kernel:1433090

Show key headers only | View raw


On 2016-06-28, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2016-06-28, Grant Edwards <grant.b.edwards@gmail.com> wrote:
>> On 2016-01-11, Peter Hurley <peter@hurleysoftware.com> wrote:
>>> On 01/11/2016 07:53 AM, Grant Edwards wrote:
>>>> On 2016-01-11, Greg KH <gregkh@linuxfoundation.org> wrote:
>>>>> On Sun, Jan 10, 2016 at 01:42:44PM -0800, Peter Hurley wrote:
>>>>>
>>>>>> This will break out-of-tree drivers but I don't really see a
>>>>>> realistic alternative. Also, I think the new symbol prefix ASY_ isn't
>>>>>> great and I'd like to get some suggestions.
>>>>>
>>>>> Don't worry about breaking out-of-tree drivers, that's fine.
>>>> 
>>>> One request from this maintainer of several out-of-tree drivers: if
>>>> you break something, break it such that it won't compile.  It would be
>>>> nice to avoid changes that break functionality but still compile
>>>> without warning.
>>>
>>> I was in the process of writing how I can't remove
>>> ASYNC_INITIALIZED, et.al from the uapi header, when I realized that
>>> I can just guard them with #ifndef _KERNEL_ which will trigger the
>>> requisite out-of-tree build break.
>
>> You know that _KERNEL_ is defined when when compiling kernel-space
>> code (either in-tree or out-of-tree), right?
>
> Ignore that.  I missed the 'n' in #ifndef.  My driver build should
> fail due to ASYNC_INITIALIZED being undefined, but it isn't.  :/
>
> For some reason _KERNEL_ is not defined when my module is being
> compiled....

That's because it's __KERNEL__ not _KERNEL_ that get's defined when
compiling kernel-space code.  So, in tty_flags.h:

    81  #define ASYNC_SPD_MASK          (ASYNC_SPD_HI|ASYNC_SPD_VHI|ASYNC_SPD_SHI)
    82  
    83  #ifndef _KERNEL_
    84  /* These flags are no longer used (and were always masked from userspace) */
    85  #define ASYNC_INITIALIZED       (1U << ASYNCB_INITIALIZED)
    86  #define ASYNC_NORMAL_ACTIVE     (1U << ASYNCB_NORMAL_ACTIVE)

Shoulnd't line 83 be 

        #ifndef __KERNEL__
?

-- 
Grant Edwards               grant.b.edwards        Yow! PARDON me, am I
                                  at               speaking ENGLISH?
                              gmail.com            

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: RFC: out-of-tree tty driver breakage (changing ASYNC_ bits) Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-28 17:50 +0200
  Re: RFC: out-of-tree tty driver breakage (changing ASYNC_ bits) Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-28 18:00 +0200
    Re: RFC: out-of-tree tty driver breakage (changing ASYNC_ bits) Grant Edwards <grant.b.edwards@gmail.com> - 2016-06-28 18:10 +0200

csiph-web