From: Sean Young <sean@mess.org>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-media@vger.kernel.org
Subject: Re: [PATCH] keytable: Add source information in generated keymaps
Date: Sat, 6 Mar 2021 15:34:43 +0000 [thread overview]
Message-ID: <20210306153443.GA513@gofer.mess.org> (raw)
In-Reply-To: <7dcbca803b370d7cf9eef7658beb338fd100d1c9.camel@hadess.net>
On Sat, Mar 06, 2021 at 04:26:53PM +0100, Bastien Nocera wrote:
> On Sat, 2021-03-06 at 14:49 +0000, Sean Young wrote:
> > On Tue, Jan 26, 2021 at 06:45:14PM +0100, Bastien Nocera wrote:
> > > Add comments to mention that keymap files are generated, and list
> > > which
> > > tool was used to generate them and the kernel source filename.
> > >
> > > This should make it less likely that generated files are used as
> > > examples to contribute keymaps from, and more likely that upstream
> > > changes are channeled through the right source tree.
> > >
> > > Signed-off-by: Bastien Nocera <hadess@hadess.net>
> > > ---
> > > utils/keytable/gen_keytables.pl | 7 ++++++-
> > > 1 file changed, 6 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/utils/keytable/gen_keytables.pl
> > > b/utils/keytable/gen_keytables.pl
> > > index c14aded3..40556479 100755
> > > --- a/utils/keytable/gen_keytables.pl
> > > +++ b/utils/keytable/gen_keytables.pl
> > > @@ -36,10 +36,15 @@ sub flush($$)
> > > my $filename = shift;
> > > my $legacy = shift;
> > > my $defined;
> > > + my $relative_filename = $filename;
> > >
> > > return if (!$keyname || !$out);
> > > - print "Creating $dir/$keyname.toml\n";
> > > + $relative_filename =~ s/^$kernel_dir//;
> > > + $relative_filename =~ s/^\///;
> > > + print "Creating $dir/$keyname.toml from
> > > $relative_filename\n";
> > > open OUT, ">$dir/$keyname.toml";
> > > + print OUT "# Generated with gen_keytables.pl in v4l-
> > > utils\n";
> > > + print OUT "# using $relative_filename as a source file\n";
> >
> > So on second thought, this is a good idea. How would feel about
> > shortening it to one line, like:
> >
> > print OUT "# Generated with gen_keytables.pl from
> > $relative_filename\n";
>
> That would be fine, yes. Feel free to amend the wording to your liking
> with my SoB.
Thanks -- patch applied
Do you want to fix the rc protocol in the Dell RC 260 keymap and apply?
Sean
>
> Cheers
>
> >
> > Thanks
> >
> > Sean
> >
> > > print OUT "[[protocols]]\n";
> > > print OUT "name = \"$keyname\"\n";
> > > print OUT "protocol = \"$type\"\n";
> > > --
> > > 2.29.2
>
next prev parent reply other threads:[~2021-03-06 15:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-26 17:45 [PATCH] keytable: Add source information in generated keymaps Bastien Nocera
2021-03-06 14:49 ` Sean Young
2021-03-06 15:26 ` Bastien Nocera
2021-03-06 15:34 ` Sean Young [this message]
2021-03-07 10:25 ` Bastien Nocera
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=20210306153443.GA513@gofer.mess.org \
--to=sean@mess.org \
--cc=hadess@hadess.net \
--cc=linux-media@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 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.