From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> To: John Ogness <john.ogness@linutronix.de> Cc: Petr Mladek <pmladek@suse.com>, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>, Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, Steven Rostedt <rostedt@goodmis.org>, Linus Torvalds <torvalds@linux-foundation.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Peter Zijlstra <peterz@infradead.org>, Thomas Gleixner <tglx@linutronix.de>, Marco Elver <elver@google.com>, kexec@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH][next] printk: ringbuffer: support dataless records Date: Tue, 21 Jul 2020 11:54:50 +0900 [thread overview] Message-ID: <20200721025450.GA5678@jagdpanzerIV.localdomain> (raw) In-Reply-To: <20200720140111.19935-1-john.ogness@linutronix.de> On (20/07/20 16:07), John Ogness wrote: > > +/* Determine if a logical position refers to a data-less block. */ > +#define LPOS_DATALESS(lpos) ((lpos) & 1UL) > + [..] > @@ -1402,7 +1396,9 @@ static int prb_read(struct printk_ringbuffer *rb, u64 seq, > /* Copy text data. If it fails, this is a data-less record. */ > if (!copy_data(&rb->text_data_ring, &desc.text_blk_lpos, desc.info.text_len, > r->text_buf, r->text_buf_size, line_count)) { > - return -ENOENT; > + /* Report an error if there should have been data. */ > + if (desc.info.text_len != 0) > + return -ENOENT; > } If this is a dataless record then should copy_data() return error? Otherwise, looks good to me Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> -ss
WARNING: multiple messages have this Message-ID (diff)
From: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> To: John Ogness <john.ogness@linutronix.de> Cc: Petr Mladek <pmladek@suse.com>, Marco Elver <elver@google.com>, Sergey Senozhatsky <sergey.senozhatsky.work@gmail.com>, Peter Zijlstra <peterz@infradead.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Steven Rostedt <rostedt@goodmis.org>, Sergey Senozhatsky <sergey.senozhatsky@gmail.com>, Thomas Gleixner <tglx@linutronix.de>, Linus Torvalds <torvalds@linux-foundation.org> Subject: Re: [PATCH][next] printk: ringbuffer: support dataless records Date: Tue, 21 Jul 2020 11:54:50 +0900 [thread overview] Message-ID: <20200721025450.GA5678@jagdpanzerIV.localdomain> (raw) In-Reply-To: <20200720140111.19935-1-john.ogness@linutronix.de> On (20/07/20 16:07), John Ogness wrote: > > +/* Determine if a logical position refers to a data-less block. */ > +#define LPOS_DATALESS(lpos) ((lpos) & 1UL) > + [..] > @@ -1402,7 +1396,9 @@ static int prb_read(struct printk_ringbuffer *rb, u64 seq, > /* Copy text data. If it fails, this is a data-less record. */ > if (!copy_data(&rb->text_data_ring, &desc.text_blk_lpos, desc.info.text_len, > r->text_buf, r->text_buf_size, line_count)) { > - return -ENOENT; > + /* Report an error if there should have been data. */ > + if (desc.info.text_len != 0) > + return -ENOENT; > } If this is a dataless record then should copy_data() return error? Otherwise, looks good to me Acked-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com> -ss _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec
next prev parent reply other threads:[~2020-07-21 2:54 UTC|newest] Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-07-20 14:01 [PATCH][next] printk: ringbuffer: support dataless records John Ogness 2020-07-20 14:01 ` John Ogness 2020-07-20 14:19 ` Marco Elver 2020-07-20 14:19 ` Marco Elver 2020-07-21 2:54 ` Sergey Senozhatsky [this message] 2020-07-21 2:54 ` Sergey Senozhatsky 2020-07-21 10:30 ` John Ogness 2020-07-21 10:30 ` John Ogness
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=20200721025450.GA5678@jagdpanzerIV.localdomain \ --to=sergey.senozhatsky@gmail.com \ --cc=elver@google.com \ --cc=gregkh@linuxfoundation.org \ --cc=john.ogness@linutronix.de \ --cc=kexec@lists.infradead.org \ --cc=linux-kernel@vger.kernel.org \ --cc=peterz@infradead.org \ --cc=pmladek@suse.com \ --cc=rostedt@goodmis.org \ --cc=sergey.senozhatsky.work@gmail.com \ --cc=tglx@linutronix.de \ --cc=torvalds@linux-foundation.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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.