lkml.org 
[lkml]   [2022]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH] linkstate: Add macros for link state up/down
From
Hey Andrew,

On 06-09-2022 14:18, Andrew Lunn wrote:
> On Tue, Sep 06, 2022 at 10:37:54AM +0200, Olliver Schinagl wrote:
>> The phylink_link_state.state property can be up or down, via 1 and 0.
>>
>> The other link state's (speed, duplex) are defined in ethtool.h so lets
>> add defines for the link-state there as well so we can use macro's to
>> define our up/down states.
> Hi Olliver
>
> The change itself is fine, but we don't add to the API without
> users. Please make use of these two new values somewhere, to show they
> are really useful.
>
> Andrew

So I've found quite a lot of users, which I suppose is good. I've since
decided to turn it into an enum, and refer in the structs as `enum
phy_linkstate link:1` (is this even legal?) Would that ok for v2?


Olliver

\
 
 \ /
  Last update: 2022-09-06 17:49    [W:0.041 / U:0.952 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site