From: Jiri Slaby <jirislaby@kernel.org>
To: "D. Starke" <daniel.starke@siemens.com>,
linux-serial@vger.kernel.org, gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 1/6] tty: n_gsm: add enumeration for gsm encodings
Date: Tue, 30 Aug 2022 08:49:08 +0200 [thread overview]
Message-ID: <3801995e-1eb5-1184-a9ba-2cec1d19bc58@kernel.org> (raw)
In-Reply-To: <20220823062259.4754-1-daniel.starke@siemens.com>
On 23. 08. 22, 8:22, D. Starke wrote:
> From: Daniel Starke <daniel.starke@siemens.com>
>
> Add an enumeration for the gsm mux encoding types to improve code
> readability and to avoid invalid values. Only two values are defined by the
> standard:
> - basic option mode
> - advanced option mode (uses ISO HDLC standard transparency mechanism)
>
> Also remove redundant configuration in gsmld_open(). The same value is
> already set in gsm_alloc_mux() which is also called in gsmld_open().
>
> Signed-off-by: Daniel Starke <daniel.starke@siemens.com>
> ---
> drivers/tty/n_gsm.c | 31 +++++++++++++++++--------------
> 1 file changed, 17 insertions(+), 14 deletions(-)
>
> No changes since v1.
>
> diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
> index caa5c14ed57f..5bf09d129357 100644
> --- a/drivers/tty/n_gsm.c
> +++ b/drivers/tty/n_gsm.c
...
> @@ -2651,7 +2656,7 @@ static void gsm_copy_config_values(struct gsm_mux *gsm,
> {
> memset(c, 0, sizeof(*c));
> c->adaption = gsm->adaption;
> - c->encapsulation = gsm->encoding;
> + c->encapsulation = (int)gsm->encoding;
IIRC, the C standard says enum behave like int. So why is the cast needed?
> c->initiator = gsm->initiator;
> c->t1 = gsm->t1;
> c->t2 = gsm->t2;
...
> @@ -2942,8 +2947,6 @@ static int gsmld_open(struct tty_struct *tty)
> tty->receive_room = 65536;
>
> /* Attach the initial passive connection */
> - gsm->encoding = 1;
> -
This doesn't relate to "add enumeration for gsm encodings". Why do you
remove this line?
> gsmld_attach_gsm(tty, gsm);
thanks,
--
js
suse labs
prev parent reply other threads:[~2022-08-30 6:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-23 6:22 D. Starke
2022-08-23 6:22 ` [PATCH v2 2/6] tty: n_gsm: name gsm tty device minors D. Starke
2022-08-30 6:49 ` Jiri Slaby
2022-08-23 6:22 ` [PATCH v2 3/6] tty: n_gsm: replace use of gsm_read_ea() with gsm_read_ea_val() D. Starke
2022-08-30 6:55 ` Jiri Slaby
2022-08-23 6:22 ` [PATCH v2 4/6] tty: n_gsm: introduce gsm_control_command() function D. Starke
2022-08-30 6:59 ` Jiri Slaby
2022-08-23 6:22 ` [PATCH v2 5/6] tty: n_gsm: name the debug bits D. Starke
2022-08-30 7:00 ` Jiri Slaby
2022-08-23 6:22 ` [PATCH v2 6/6] tty: n_gsm: add debug bit for user payload D. Starke
2022-08-30 6:49 ` Jiri Slaby [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3801995e-1eb5-1184-a9ba-2cec1d19bc58@kernel.org \
--to=jirislaby@kernel.org \
--cc=daniel.starke@siemens.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®