linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tony Lindgren <tony@atomide.com>
To: Jiri Slaby <jirislaby@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Gregory CLEMENT <gregory.clement@bootlin.com>,
	linux-serial@vger.kernel.org, linux-kernel@vger.kernel.org,
	Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: Re: [PATCH] n_gsm: Fix write handling for zero bytes written
Date: Wed, 19 Aug 2020 09:40:55 +0300	[thread overview]
Message-ID: <20200819064055.GV2994@atomide.com> (raw)
In-Reply-To: <34dd61d2-01c3-dcc1-21bd-494eb90759ac@kernel.org>

* Jiri Slaby <jirislaby@kernel.org> [200819 06:20]:
> On 18. 08. 20, 12:47, Tony Lindgren wrote:
> > * Jiri Slaby <jirislaby@kernel.org> [200818 10:14]:
> >> On 18. 08. 20, 11:56, Tony Lindgren wrote:
> >>> Hi,
> >>>
> >>> * Jiri Slaby <jirislaby@kernel.org> [200818 08:24]:
> >>>> On 17. 08. 20, 15:54, Tony Lindgren wrote:
> >>>>> If write returns zero we currently end up removing the message
> >>>>> from the queue. Instead of removing the message, we want to just
> >>>>> break out of the loop just like we already do for error codes.
> >>>>
> >>>> When exactly does the only writer (gsmld_output) return zero for
> >>>> non-zero len parameter?
> >>>
> >>> I ran into this when testing with the WIP serial core PM runtime
> >>> changes from Andy Shevchenko earlier. If there are also other
> >>> cases where we have serial drivers return 0, I don't know about
> >>> them.
> >>
> >> Sorry, I don't understand: my gsmld_output() ignores the return value
> >> from drivers' write and returns something greater than zero or a
> >> negative error. What tree/SHA do you run?
> > 
> > Oh right, good catch. I also had my WIP serdev-ngsm patches applied
> > that uses gsm_serdev_output() and returns the bytes written. Andy's
> > patches do not touch n_gsm.c.
> > 
> > Hmm sounds like we should also start returning value also from
> > gsmld_output()? Any objections to making that change?
> 
> No objections here.

OK thanks, I'll post an updated patch.

Regards,

Tony

      reply	other threads:[~2020-08-19  6:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-17 13:54 [PATCH] n_gsm: Fix write handling for zero bytes written Tony Lindgren
2020-08-18  8:24 ` Jiri Slaby
2020-08-18  9:56   ` Tony Lindgren
2020-08-18 10:14     ` Jiri Slaby
2020-08-18 10:47       ` Tony Lindgren
2020-08-19  6:19         ` Jiri Slaby
2020-08-19  6:40           ` Tony Lindgren [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=20200819064055.GV2994@atomide.com \
    --to=tony@atomide.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=gregory.clement@bootlin.com \
    --cc=jirislaby@kernel.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;
as well as URLs for NNTP newsgroup(s).