public inbox for linux-staging@lists.linux.dev
 help / color / mirror / Atom feed
* [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
@ 2022-11-21 15:58 Geert Uytterhoeven
  2022-11-23  8:44 ` Ricardo Ribalda
  2022-11-23 10:08 ` Tommaso Merciai
  0 siblings, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2022-11-21 15:58 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, Greg Kroah-Hartman, Hans Verkuil,
	Laurent Pinchart, Andrzej Pietrasiewicz, Ricardo Ribalda
  Cc: linux-media, linux-staging, linux-kernel, Geert Uytterhoeven

By moving support for the USB Syntek DC1125 Camera to staging, the
dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.

Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/staging/media/deprecated/stkwebcam/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/media/deprecated/stkwebcam/Kconfig b/drivers/staging/media/deprecated/stkwebcam/Kconfig
index 4450403dff41fb64..7234498e634ac61c 100644
--- a/drivers/staging/media/deprecated/stkwebcam/Kconfig
+++ b/drivers/staging/media/deprecated/stkwebcam/Kconfig
@@ -2,7 +2,7 @@
 config VIDEO_STKWEBCAM
 	tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
 	depends on VIDEO_DEV
-	depends on USB
+	depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
 	help
 	  Say Y here if you want to use this type of camera.
 	  Supported devices are typically found in some Asus laptops,
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-21 15:58 [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies Geert Uytterhoeven
@ 2022-11-23  8:44 ` Ricardo Ribalda
  2022-11-23 10:08 ` Tommaso Merciai
  1 sibling, 0 replies; 9+ messages in thread
From: Ricardo Ribalda @ 2022-11-23  8:44 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Hans Verkuil,
	Laurent Pinchart, Andrzej Pietrasiewicz, linux-media,
	linux-staging, linux-kernel

On Mon, 21 Nov 2022 at 16:58, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:
>
> By moving support for the USB Syntek DC1125 Camera to staging, the
> dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
>
> Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Ricardo Ribalda <ribalda@chromium.org>
> ---
>  drivers/staging/media/deprecated/stkwebcam/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/media/deprecated/stkwebcam/Kconfig b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> index 4450403dff41fb64..7234498e634ac61c 100644
> --- a/drivers/staging/media/deprecated/stkwebcam/Kconfig
> +++ b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> @@ -2,7 +2,7 @@
>  config VIDEO_STKWEBCAM
>         tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
>         depends on VIDEO_DEV
> -       depends on USB
> +       depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
>         help
>           Say Y here if you want to use this type of camera.
>           Supported devices are typically found in some Asus laptops,
> --
> 2.25.1
>


-- 
Ricardo Ribalda

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-21 15:58 [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies Geert Uytterhoeven
  2022-11-23  8:44 ` Ricardo Ribalda
@ 2022-11-23 10:08 ` Tommaso Merciai
  2022-11-23 10:13   ` Geert Uytterhoeven
  1 sibling, 1 reply; 9+ messages in thread
From: Tommaso Merciai @ 2022-11-23 10:08 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman, Hans Verkuil,
	Laurent Pinchart, Andrzej Pietrasiewicz, Ricardo Ribalda,
	linux-media, linux-staging, linux-kernel

Hi Geert,

On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> By moving support for the USB Syntek DC1125 Camera to staging, the
> dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> 
> Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")

Patch itself looks good but we have some style issue. Applying this
patch I got the following warning from checkpatchl:

WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
#10: 

You have to pass only the first 12 chars of the sha1 commit into Fixes
msg:

Use:

 Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")

Instead of:

 Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")

Thanks & Regards,
Tommaso

> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  drivers/staging/media/deprecated/stkwebcam/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/media/deprecated/stkwebcam/Kconfig b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> index 4450403dff41fb64..7234498e634ac61c 100644
> --- a/drivers/staging/media/deprecated/stkwebcam/Kconfig
> +++ b/drivers/staging/media/deprecated/stkwebcam/Kconfig
> @@ -2,7 +2,7 @@
>  config VIDEO_STKWEBCAM
>  	tristate "USB Syntek DC1125 Camera support (DEPRECATED)"
>  	depends on VIDEO_DEV
> -	depends on USB
> +	depends on MEDIA_USB_SUPPORT && MEDIA_CAMERA_SUPPORT
>  	help
>  	  Say Y here if you want to use this type of camera.
>  	  Supported devices are typically found in some Asus laptops,
> -- 
> 2.25.1
> 

-- 
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai@amarulasolutions.com
__________________________________

Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-23 10:08 ` Tommaso Merciai
@ 2022-11-23 10:13   ` Geert Uytterhoeven
  2022-11-23 10:35     ` Tommaso Merciai
  2022-11-23 15:10     ` Dan Carpenter
  0 siblings, 2 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2022-11-23 10:13 UTC (permalink / raw)
  To: Tommaso Merciai
  Cc: Geert Uytterhoeven, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Hans Verkuil, Laurent Pinchart, Andrzej Pietrasiewicz,
	Ricardo Ribalda, linux-media, linux-staging, linux-kernel

Hi Tommaso,

On Wed, Nov 23, 2022 at 11:08 AM Tommaso Merciai
<tommaso.merciai@amarulasolutions.com> wrote:
> On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> > By moving support for the USB Syntek DC1125 Camera to staging, the
> > dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> >
> > Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
>
> Patch itself looks good but we have some style issue. Applying this
> patch I got the following warning from checkpatchl:
>
> WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
> #10:
>
> You have to pass only the first 12 chars of the sha1 commit into Fixes
> msg:
>
> Use:
>
>  Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")
>
> Instead of:
>
>  Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")

I always use 16 chars, to avoid these becoming ambiguous in a few years.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-23 10:13   ` Geert Uytterhoeven
@ 2022-11-23 10:35     ` Tommaso Merciai
  2022-11-23 15:10     ` Dan Carpenter
  1 sibling, 0 replies; 9+ messages in thread
From: Tommaso Merciai @ 2022-11-23 10:35 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Geert Uytterhoeven, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Hans Verkuil, Laurent Pinchart, Andrzej Pietrasiewicz,
	Ricardo Ribalda, linux-media, linux-staging, linux-kernel

Hi Gaert,

On Wed, Nov 23, 2022 at 11:13:31AM +0100, Geert Uytterhoeven wrote:
> Hi Tommaso,
> 
> On Wed, Nov 23, 2022 at 11:08 AM Tommaso Merciai
> <tommaso.merciai@amarulasolutions.com> wrote:
> > On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> > > By moving support for the USB Syntek DC1125 Camera to staging, the
> > > dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> > >
> > > Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> >
> > Patch itself looks good but we have some style issue. Applying this
> > patch I got the following warning from checkpatchl:
> >
> > WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
> > #10:
> >
> > You have to pass only the first 12 chars of the sha1 commit into Fixes
> > msg:
> >
> > Use:
> >
> >  Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")
> >
> > Instead of:
> >
> >  Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> 
> I always use 16 chars, to avoid these becoming ambiguous in a few years.
> 
> Gr{oetje,eeting}s,

Thanks for sharing this info.

Regards,
Tommaso

> 
>                         Geert
> 
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
> 
> In personal conversations with technical people, I call myself a hacker. But
> when I'm talking to journalists I just say "programmer" or something like that.
>                                 -- Linus Torvalds

-- 
Tommaso Merciai
Embedded Linux Engineer
tommaso.merciai@amarulasolutions.com
__________________________________

Amarula Solutions SRL
Via Le Canevare 30, 31100 Treviso, Veneto, IT
T. +39 042 243 5310
info@amarulasolutions.com
www.amarulasolutions.com

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-23 10:13   ` Geert Uytterhoeven
  2022-11-23 10:35     ` Tommaso Merciai
@ 2022-11-23 15:10     ` Dan Carpenter
  2022-11-23 15:49       ` Geert Uytterhoeven
  1 sibling, 1 reply; 9+ messages in thread
From: Dan Carpenter @ 2022-11-23 15:10 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Tommaso Merciai, Geert Uytterhoeven, Mauro Carvalho Chehab,
	Greg Kroah-Hartman, Hans Verkuil, Laurent Pinchart,
	Andrzej Pietrasiewicz, Ricardo Ribalda, linux-media,
	linux-staging, linux-kernel

On Wed, Nov 23, 2022 at 11:13:31AM +0100, Geert Uytterhoeven wrote:
> Hi Tommaso,
> 
> On Wed, Nov 23, 2022 at 11:08 AM Tommaso Merciai
> <tommaso.merciai@amarulasolutions.com> wrote:
> > On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> > > By moving support for the USB Syntek DC1125 Camera to staging, the
> > > dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> > >
> > > Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> >
> > Patch itself looks good but we have some style issue. Applying this
> > patch I got the following warning from checkpatchl:
> >
> > WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
> > #10:
> >
> > You have to pass only the first 12 chars of the sha1 commit into Fixes
> > msg:
> >
> > Use:
> >
> >  Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")
> >
> > Instead of:
> >
> >  Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> 
> I always use 16 chars, to avoid these becoming ambiguous in a few years.
> 

If we assume hashes are randomly distributed and that people commit
100k patches every year then with 12 character we would have 17
collisions every 1000 years.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-23 15:10     ` Dan Carpenter
@ 2022-11-23 15:49       ` Geert Uytterhoeven
  2022-11-23 15:51         ` Dan Carpenter
  0 siblings, 1 reply; 9+ messages in thread
From: Geert Uytterhoeven @ 2022-11-23 15:49 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Tommaso Merciai, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Hans Verkuil, Laurent Pinchart, Andrzej Pietrasiewicz,
	Ricardo Ribalda, linux-media, linux-staging, linux-kernel

Hi Dan,

On Wed, Nov 23, 2022 at 4:11 PM Dan Carpenter <error27@gmail.com> wrote:
> On Wed, Nov 23, 2022 at 11:13:31AM +0100, Geert Uytterhoeven wrote:
> > On Wed, Nov 23, 2022 at 11:08 AM Tommaso Merciai
> > <tommaso.merciai@amarulasolutions.com> wrote:
> > > On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> > > > By moving support for the USB Syntek DC1125 Camera to staging, the
> > > > dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> > > >
> > > > Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> > >
> > > Patch itself looks good but we have some style issue. Applying this
> > > patch I got the following warning from checkpatchl:
> > >
> > > WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
> > > #10:
> > >
> > > You have to pass only the first 12 chars of the sha1 commit into Fixes
> > > msg:
> > >
> > > Use:
> > >
> > >  Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")
> > >
> > > Instead of:
> > >
> > >  Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> >
> > I always use 16 chars, to avoid these becoming ambiguous in a few years.
>
> If we assume hashes are randomly distributed and that people commit
> 100k patches every year then with 12 character we would have 17
> collisions every 1000 years.

So I can expect to see a collision before my retirement day
(which coincides with the signed 32-bit time_t flag day ;-)

BTW, does the above take into account that commit hashes can
collide with other object type hashes, too?

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-23 15:49       ` Geert Uytterhoeven
@ 2022-11-23 15:51         ` Dan Carpenter
  2022-11-23 16:06           ` Geert Uytterhoeven
  0 siblings, 1 reply; 9+ messages in thread
From: Dan Carpenter @ 2022-11-23 15:51 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Tommaso Merciai, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Hans Verkuil, Laurent Pinchart, Andrzej Pietrasiewicz,
	Ricardo Ribalda, linux-media, linux-staging, linux-kernel

On Wed, Nov 23, 2022 at 04:49:05PM +0100, Geert Uytterhoeven wrote:
> Hi Dan,
> 
> On Wed, Nov 23, 2022 at 4:11 PM Dan Carpenter <error27@gmail.com> wrote:
> > On Wed, Nov 23, 2022 at 11:13:31AM +0100, Geert Uytterhoeven wrote:
> > > On Wed, Nov 23, 2022 at 11:08 AM Tommaso Merciai
> > > <tommaso.merciai@amarulasolutions.com> wrote:
> > > > On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> > > > > By moving support for the USB Syntek DC1125 Camera to staging, the
> > > > > dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> > > > >
> > > > > Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> > > >
> > > > Patch itself looks good but we have some style issue. Applying this
> > > > patch I got the following warning from checkpatchl:
> > > >
> > > > WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
> > > > #10:
> > > >
> > > > You have to pass only the first 12 chars of the sha1 commit into Fixes
> > > > msg:
> > > >
> > > > Use:
> > > >
> > > >  Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")
> > > >
> > > > Instead of:
> > > >
> > > >  Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> > >
> > > I always use 16 chars, to avoid these becoming ambiguous in a few years.
> >
> > If we assume hashes are randomly distributed and that people commit
> > 100k patches every year then with 12 character we would have 17
> > collisions every 1000 years.
> 
> So I can expect to see a collision before my retirement day
> (which coincides with the signed 32-bit time_t flag day ;-)
> 
> BTW, does the above take into account that commit hashes can
> collide with other object type hashes, too?

I assumed that `git show` won't show those other object types, but I
don't really know if that's true.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies
  2022-11-23 15:51         ` Dan Carpenter
@ 2022-11-23 16:06           ` Geert Uytterhoeven
  0 siblings, 0 replies; 9+ messages in thread
From: Geert Uytterhoeven @ 2022-11-23 16:06 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Tommaso Merciai, Mauro Carvalho Chehab, Greg Kroah-Hartman,
	Hans Verkuil, Laurent Pinchart, Andrzej Pietrasiewicz,
	Ricardo Ribalda, linux-media, linux-staging, linux-kernel

Hi Dan,

On Wed, Nov 23, 2022 at 4:52 PM Dan Carpenter <error27@gmail.com> wrote:
> On Wed, Nov 23, 2022 at 04:49:05PM +0100, Geert Uytterhoeven wrote:
> > On Wed, Nov 23, 2022 at 4:11 PM Dan Carpenter <error27@gmail.com> wrote:
> > > On Wed, Nov 23, 2022 at 11:13:31AM +0100, Geert Uytterhoeven wrote:
> > > > On Wed, Nov 23, 2022 at 11:08 AM Tommaso Merciai
> > > > <tommaso.merciai@amarulasolutions.com> wrote:
> > > > > On Mon, Nov 21, 2022 at 04:58:33PM +0100, Geert Uytterhoeven wrote:
> > > > > > By moving support for the USB Syntek DC1125 Camera to staging, the
> > > > > > dependencies on MEDIA_USB_SUPPORT and MEDIA_CAMERA_SUPPORT were lost.
> > > > > >
> > > > > > Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> > > > >
> > > > > Patch itself looks good but we have some style issue. Applying this
> > > > > patch I got the following warning from checkpatchl:
> > > > >
> > > > > WARNING: Please use correct Fixes: style 'Fixes: <12 chars of sha1> ("<title line>")' - ie: 'Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")'
> > > > > #10:
> > > > >
> > > > > You have to pass only the first 12 chars of the sha1 commit into Fixes
> > > > > msg:
> > > > >
> > > > > Use:
> > > > >
> > > > >  Fixes: 56280c64ecac ("media: stkwebcam: deprecate driver, move to staging")
> > > > >
> > > > > Instead of:
> > > > >
> > > > >  Fixes: 56280c64ecacc971 ("media: stkwebcam: deprecate driver, move to staging")
> > > >
> > > > I always use 16 chars, to avoid these becoming ambiguous in a few years.
> > >
> > > If we assume hashes are randomly distributed and that people commit
> > > 100k patches every year then with 12 character we would have 17
> > > collisions every 1000 years.
> >
> > So I can expect to see a collision before my retirement day
> > (which coincides with the signed 32-bit time_t flag day ;-)
> >
> > BTW, does the above take into account that commit hashes can
> > collide with other object type hashes, too?
>
> I assumed that `git show` won't show those other object types, but I
> don't really know if that's true.

"git show" is not limited to commit types:

$ git cat-file commit eb7081409f94a9a8608593d0fb63a1aa3d6f95d8
tree 0e320b5ae477efe1c9928057762bf63d730204ce
parent c6c67bf9bc2714d9c2c2e7ecfbf29d912b8c4f17
author Linus Torvalds <torvalds@linux-foundation.org> 1668988936 -0800
committer Linus Torvalds <torvalds@linux-foundation.org> 1668988936 -0800

Linux 6.1-rc6
$ git show 0e320b5ae477efe1c9928057762bf63d730204ce
tree 0e320b5ae477efe1c9928057762bf63d730204ce

.clang-format
.cocciconfig
[...]
$ git show eb708
error: short SHA1 eb708 is ambiguous
hint: The candidates are:
hint:   eb7081409f94a9a8 commit 2022-11-20 - Linux 6.1-rc6
hint:   eb708b0ff972bfe0 commit 2016-11-12 - arm64: dts: Add ARM PMU
node for exynos7
hint:   eb7080213d0fee54 tree
hint:   eb7080d36f660012 tree
hint:   eb7083e15bcb5eea tree
hint:   eb7083f45a088bf3 tree
hint:   eb7084a7ae5f486a tree
hint:   eb70866f5c60a477 tree
hint:   eb7087c754052a42 tree
hint:   eb7089eeb5f67a5f tree
hint:   eb708a906ceeea91 tree
hint:   eb708c1853ce1355 tree
hint:   eb708ca4d77be915 tree
hint:   eb708e4839466fdd tree
hint:   eb708431cb964d36 blob
hint:   eb708b77c4a54a68 blob
fatal: ambiguous argument 'eb708': unknown revision or path not in the
working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

I couldn't find an easy way to count the number of objects per
type in a repository.

Gr{oetje,eeting}s,

                        Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2022-11-23 16:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 15:58 [PATCH resend] media: staging: stkwebcam: Restore MEDIA_{USB,CAMERA}_SUPPORT dependencies Geert Uytterhoeven
2022-11-23  8:44 ` Ricardo Ribalda
2022-11-23 10:08 ` Tommaso Merciai
2022-11-23 10:13   ` Geert Uytterhoeven
2022-11-23 10:35     ` Tommaso Merciai
2022-11-23 15:10     ` Dan Carpenter
2022-11-23 15:49       ` Geert Uytterhoeven
2022-11-23 15:51         ` Dan Carpenter
2022-11-23 16:06           ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox