lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <YtpLuJPUT8DXZUTx@kroah.com>
Date:   Fri, 22 Jul 2022 09:03:20 +0200
From:   Greg KH <gregkh@...uxfoundation.org>
To:     Yan Xinyu <sdlyyxy@...t.edu.cn>
Cc:     johan@...nel.org, linux-usb@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] USB: serial: usb_wwan: replace DTR/RTS magic numbers
 with macros

On Fri, Jul 22, 2022 at 10:40:51AM +0800, Yan Xinyu wrote:
> > On Jul 22, 2022, at 02:18, Greg KH <gregkh@...uxfoundation.org> wrote:
> > 
> > On Thu, Jul 21, 2022 at 11:52:57PM +0800, Yan Xinyu wrote:
> >> The usb_wwan_send_setup function generates DTR/RTS signals in compliance
> >> with CDC ACM standard. This patch changes magic numbers in this function
> >> to equivalent macros.
> >> 
> >> Signed-off-by: Yan Xinyu <sdlyyxy@...t.edu.cn>
> >> ---
> >> v1->v2:
> >> * Fix Signed-off-by name.
> >> ---
> >> drivers/usb/serial/usb_wwan.c | 13 +++++++++----
> >> 1 file changed, 9 insertions(+), 4 deletions(-)
> >> 
> >> diff --git a/drivers/usb/serial/usb_wwan.c b/drivers/usb/serial/usb_wwan.c
> >> index dab38b63eaf7..a6bd6144702d 100644
> >> --- a/drivers/usb/serial/usb_wwan.c
> >> +++ b/drivers/usb/serial/usb_wwan.c
> >> @@ -29,10 +29,14 @@
> >> #include <linux/bitops.h>
> >> #include <linux/uaccess.h>
> >> #include <linux/usb.h>
> >> +#include <linux/usb/cdc.h>
> >> #include <linux/usb/serial.h>
> >> #include <linux/serial.h>
> >> #include "usb-wwan.h"
> >> 
> >> +#define ACM_CTRL_DTR 0x01
> >> +#define ACM_CTRL_RTS 0x02
> > 
> > Why are these not in the cdc.h file already?
> 
> These are defined in the drivers/usb/class/cdc-acm.h file. Is it safe
> to include it?

Yes, of course!

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ