linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
To: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Kieran Bingham <kieran.bingham+renesas@ideasonboard.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Sasha Levin <sashal@kernel.org>,
	Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>,
	Mauro Carvalho Chehab <mchehab@kernel.org>,
	Linux Media Mailing List <linux-media@vger.kernel.org>,
	Linux-Renesas <linux-renesas-soc@vger.kernel.org>,
	Koji Matsuoka <koji.matsuoka.xm@renesas.com>,
	Takeshi Kihara <takeshi.kihara.df@renesas.com>,
	Harunobu Kurokawa <harunobu.kurokawa.dn@renesas.com>,
	Khiem Nguyen <khiem.nguyen.xt@renesas.com>,
	Hien Dang <hien.dang.eb@renesas.com>
Subject: Re: [PATCH] media: vsp1: tidyup VI6_HGT_LBn_H() macro
Date: Sat, 14 Dec 2019 00:43:48 +0200	[thread overview]
Message-ID: <20191213224348.GU4860@pendragon.ideasonboard.com> (raw)
In-Reply-To: <CAMuHMdVEaPQ1r2v=f9RV8roO7T0+z86k18Ka6LYNqR0xwnyrpQ@mail.gmail.com>

Hello,

On Fri, Dec 13, 2019 at 02:22:56PM +0100, Geert Uytterhoeven wrote:
> On Fri, Dec 13, 2019 at 12:55 PM Kieran Bingham wrote:
> > On 12/12/2019 07:33, Greg Kroah-Hartman wrote:
> > > On Wed, Dec 11, 2019 at 09:58:11PM +0000, Kieran Bingham wrote:
> > >> +Greg, +Sasha to opine on the merit of whether this should go to stable
> > >> trees (for my future learning and understanding more so than this
> > >> specific case)
> > >>
> > >> On 11/12/2019 17:58, Laurent Pinchart wrote:
> > >>> On Wed, Dec 11, 2019 at 12:59:57PM +0000, Kieran Bingham wrote:
> > >>>> On 11/12/2019 01:55, Kuninori Morimoto wrote:
> > >>>>>
> > >>>>> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > >>>>>
> > >>>>> The address of VSP2_VI6_HGT_LBx_H are
> > >>>>>   VSP2_VI6_HGT_LB0_H : 0x3428
> > >>>>>   VSP2_VI6_HGT_LB1_H : 0x3430
> > >>>>>   VSP2_VI6_HGT_LB2_H : 0x3438
> > >>>>>   VSP2_VI6_HGT_LB3_H : 0x3440
> > >>>>>
> > >>>>> Thus, VI6_HGT_LBn_H() macro should start from 0x3420 instead of 0x3430.
> > >>>>> This patch fixup it.
> > >>
> > >> s/fixup/fixes/
> > >>
> > >>>> I think this deserves a fixes tag:
> > >>>>
> > >>>> Fixes: 26e0ca22c3b8 ("[media] v4l: Renesas R-Car VSP1 driver")
> > >>>
> > >>> Given that this macro is not used, we could argue that it doesn't fix
> > >>> anything yet :-) I'd rather avoid having this backported to stable
> > >>> kernels as it's not useful to have it there, and thus not add a Fixes
> > >>
> > >> I'm sorry - I'm not sure I can agree here, Do you know that no one will
> > >> use this macro when they back port the HGT functionality to an LTSI kernel?
> > >>
> > >> We know the Renesas BSP uses LTSI kernels, and the very nature of the
> > >> fact that this typo has been spotted by the Renesas BSP team suggests
> > >> that they are indeed looking at/using this functionality ...
> > >>
> > >> (Ok, so maybe they will thus apply the fix themselves, but that's not my
> > >> point, and if they 'have' to apply the fix - it should be in stable?)
> > >>
> > >> It feels a bit presumptuous to state that we shouldn't fix this because
> > >> /we/ don't utilise it yet, when this issue is in mainline regardless ...
> > >
> > > Nothing should be in the kernel tree that is not already used by
> > > something in that specific kernel tree.  We don't care about out-of-tree
> > > code, and especially for stable kernel patches, it does not matter in
> > > the least.
> >
> > So perhaps this patch should actually remove this macro rather than fix it?
> 
> IMHO removing all unused register and register bit definitions from drivers
> would not improve them. On the contrary.
> These also serve as a kind of documentation, as low-level documentation
> about the hardware is not always available publicly.
> 
> > > If you have out-of-tree code, you are on your own here, sorry.
> > >
> > > So no, no backporting of stuff that no one actually uses in the codebase
> > > itself.
> >
> > Ok understood, It was really the 'the macro exists in the kernel, but is
> > wrong' part that got me.
> 
> There is a difference between code that is not used, and register definitions.
> 
> > Along with the fact that we now have various automated machinery that
> > would likely pick this patch up and backport it anyway?
> >
> > (Sasha, is that assumption accurate? Or would you/your system have
> > identified that this macro is not used?)
> 
> IMHO the real danger lies in not backporting this, and forgetting to
> backport this fix when future code that does use this definition is
> backported.
> This may happen +5 years from now, and the feature may be backported to
> a 10-year old LTS(i) kernel, causing subtle issues in your 8 year old car...
> 
> Basically we can do 4 things:
>   1. Fix the buggy definition, and not backport the fix,
>       => may trigger the issue above.
>   2. idem, but backport the fix,
>   3. Remove the buggy definition, and not backport the removal,
>       => may trigger the issue above, if people miss-backport the re-addition.
>       => people may just revert the removal when they need the definition.
>   4. idem, but backport the removal.
>       => same as 3.
> 
> So I am in favor of fixing the buggy definition, with a Fixes tag, so
> stable will pick it up, and anyone else (if any not using LTS) can look
> for Fixes tags and know what fixes to backport.
> 
> Of course, all of this can be avoided by using the One Way Of Linux ;-)
> https://society.oftrolls.com/@geert/102984898449908163
> 
> Just my 2€c.

You 2¢ resulted in the Fixed: line being added to the patch in my tree
:-)

-- 
Regards,

Laurent Pinchart

  reply	other threads:[~2019-12-13 22:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <redmine.issue-245033.20191211005426@dm.renesas.com>
     [not found] ` <redmine.issue-245033.20191211005426.161918957b73008d@dm.renesas.com>
2019-12-11  1:55   ` [PATCH] media: vsp1: tidyup VI6_HGT_LBn_H() macro Kuninori Morimoto
2019-12-11 12:59     ` Kieran Bingham
2019-12-11 17:58       ` Laurent Pinchart
2019-12-11 21:58         ` Kieran Bingham
2019-12-11 23:45           ` Laurent Pinchart
2019-12-12  7:33           ` Greg Kroah-Hartman
2019-12-13 11:55             ` Kieran Bingham
2019-12-13 13:22               ` Geert Uytterhoeven
2019-12-13 22:43                 ` Laurent Pinchart [this message]
2019-12-15 15:45               ` Sasha Levin
2020-02-12  0:43         ` Kuninori Morimoto

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=20191213224348.GU4860@pendragon.ideasonboard.com \
    --to=laurent.pinchart@ideasonboard.com \
    --cc=geert@linux-m68k.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=harunobu.kurokawa.dn@renesas.com \
    --cc=hien.dang.eb@renesas.com \
    --cc=khiem.nguyen.xt@renesas.com \
    --cc=kieran.bingham+renesas@ideasonboard.com \
    --cc=koji.matsuoka.xm@renesas.com \
    --cc=kuninori.morimoto.gx@renesas.com \
    --cc=linux-media@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=mchehab@kernel.org \
    --cc=sashal@kernel.org \
    --cc=takeshi.kihara.df@renesas.com \
    /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).