Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1433079 > unrolled thread
| Started by | Grant Edwards <grant.b.edwards@gmail.com> |
|---|---|
| First post | 2016-06-28 17:50 +0200 |
| Last post | 2016-06-28 18:10 +0200 |
| Articles | 3 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
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
| From | Grant Edwards <grant.b.edwards@gmail.com> |
|---|---|
| Date | 2016-06-28 17:50 +0200 |
| Subject | Re: RFC: out-of-tree tty driver breakage (changing ASYNC_ bits) |
| Message-ID | <rP3qV-uu-17@gated-at.bofh.it> |
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.
One of my drivers checks that state of port.flags & ASYNC_INITIALIZED
in various places (it also checks some other port.flags bits
(_CLOSING, _SPD_xxxx, _LOW_LATENCY).
I've been regulary building against linux-next waiting for the build
to fail when the flag changes got pulled. It still builds cleanly,
but it looks like the flags canges are indeed in linux-next.
Does that mean that I don't need to change my code to use
tty_port_initialized()?
You know that _KERNEL_ is defined when when compiling kernel-space
code (either in-tree or out-of-tree), right?
I see from comments in tty_flags.h that ASYNC_CLOSING is no longer
used. But I don't see a replacement in tty.h
--
Grant Edwards grant.b.edwards Yow! I'm having a
at tax-deductible experience!
gmail.com I need an energy crunch!!
[toc] | [next] | [standalone]
| From | Grant Edwards <grant.b.edwards@gmail.com> |
|---|---|
| Date | 2016-06-28 18:00 +0200 |
| Message-ID | <rP3AB-ys-5@gated-at.bofh.it> |
| In reply to | #1433079 |
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....
--
Grant Edwards grant.b.edwards Yow! JAPAN is a WONDERFUL
at planet -- I wonder if we'll
gmail.com ever reach their level of
COMPARATIVE SHOPPING ...
[toc] | [prev] | [next] | [standalone]
| From | Grant Edwards <grant.b.edwards@gmail.com> |
|---|---|
| Date | 2016-06-28 18:10 +0200 |
| Message-ID | <rP3Kh-Rj-21@gated-at.bofh.it> |
| In reply to | #1433082 |
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
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web