* [PATCH] media: usb: uvc: uvc_driver: Added a function pr_info() in uvc_driver and staging: android: Decleared file operation with const keyword in android keyword
@ 2021-07-15 19:49 Saptarshi Patra
2021-07-15 20:04 ` Laurent Pinchart
0 siblings, 1 reply; 2+ messages in thread
From: Saptarshi Patra @ 2021-07-15 19:49 UTC (permalink / raw)
Cc: saptarshi.patra.22, Laurent Pinchart, Mauro Carvalho Chehab,
Greg Kroah-Hartman, Arve Hjønnevåg, Todd Kjos,
Martijn Coenen, Joel Fernandes, Christian Brauner,
Hridya Valsaraju, Suren Baghdasaryan, linux-media, linux-kernel,
linux-staging
media: usb: uvc: uvc_driver: Decleared a function called
pr_info() with a string input "I changed uvcvideo driver in the Linux
Kernel"
Added the function pr_info() to see the message / input string using dmesg
staging: android: Decleared file operation with const keyword
Warning found by the checkpatch.pl script
Signed-off-by: Saptarshi Patra <saptarshi.patra.22@gmail.com>
---
drivers/media/usb/uvc/uvc_driver.c | 2 +-
drivers/staging/android/ashmem.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
index 9a791d8ef200..0b47ca75091b 100644
--- a/drivers/media/usb/uvc/uvc_driver.c
+++ b/drivers/media/usb/uvc/uvc_driver.c
@@ -2352,7 +2352,7 @@ static int uvc_probe(struct usb_interface *intf,
(const struct uvc_device_info *)id->driver_info;
int function;
int ret;
-
+ pr_info("I changed uvcvideo driver in the Linux Kernel\n");
/* Allocate memory for the device and initialize it. */
dev = kzalloc(sizeof(*dev), GFP_KERNEL);
if (dev == NULL)
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
index ddbde3f8430e..4c6b420fbf4d 100644
--- a/drivers/staging/android/ashmem.c
+++ b/drivers/staging/android/ashmem.c
@@ -377,7 +377,7 @@ ashmem_vmfile_get_unmapped_area(struct file *file, unsigned long addr,
static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
{
- static struct file_operations vmfile_fops;
+ static const struct file_operations vmfile_fops;
struct ashmem_area *asma = file->private_data;
int ret = 0;
--
2.30.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] media: usb: uvc: uvc_driver: Added a function pr_info() in uvc_driver and staging: android: Decleared file operation with const keyword in android keyword
2021-07-15 19:49 [PATCH] media: usb: uvc: uvc_driver: Added a function pr_info() in uvc_driver and staging: android: Decleared file operation with const keyword in android keyword Saptarshi Patra
@ 2021-07-15 20:04 ` Laurent Pinchart
0 siblings, 0 replies; 2+ messages in thread
From: Laurent Pinchart @ 2021-07-15 20:04 UTC (permalink / raw)
To: Saptarshi Patra
Cc: Mauro Carvalho Chehab, Greg Kroah-Hartman,
Arve Hjønnevåg, Todd Kjos, Martijn Coenen,
Joel Fernandes, Christian Brauner, Hridya Valsaraju,
Suren Baghdasaryan, linux-media, linux-kernel, linux-staging
Hi Saptarshi,
On Fri, Jul 16, 2021 at 01:19:10AM +0530, Saptarshi Patra wrote:
> media: usb: uvc: uvc_driver: Decleared a function called
> pr_info() with a string input "I changed uvcvideo driver in the Linux
> Kernel"
>
> Added the function pr_info() to see the message / input string using dmesg
I'm curious, could you explain why you think this should be merged in
the upstream kernel ? I fear the kernel log may get a bit too verbose if
everybody added their own little message :-)
> staging: android: Decleared file operation with const keyword
Don't combine multiple independent changes in a single patch.
> Warning found by the checkpatch.pl script
>
> Signed-off-by: Saptarshi Patra <saptarshi.patra.22@gmail.com>
> ---
> drivers/media/usb/uvc/uvc_driver.c | 2 +-
> drivers/staging/android/ashmem.c | 2 +-
> 2 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/media/usb/uvc/uvc_driver.c b/drivers/media/usb/uvc/uvc_driver.c
> index 9a791d8ef200..0b47ca75091b 100644
> --- a/drivers/media/usb/uvc/uvc_driver.c
> +++ b/drivers/media/usb/uvc/uvc_driver.c
> @@ -2352,7 +2352,7 @@ static int uvc_probe(struct usb_interface *intf,
> (const struct uvc_device_info *)id->driver_info;
> int function;
> int ret;
> -
> + pr_info("I changed uvcvideo driver in the Linux Kernel\n");
> /* Allocate memory for the device and initialize it. */
> dev = kzalloc(sizeof(*dev), GFP_KERNEL);
> if (dev == NULL)
> diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c
> index ddbde3f8430e..4c6b420fbf4d 100644
> --- a/drivers/staging/android/ashmem.c
> +++ b/drivers/staging/android/ashmem.c
> @@ -377,7 +377,7 @@ ashmem_vmfile_get_unmapped_area(struct file *file, unsigned long addr,
>
> static int ashmem_mmap(struct file *file, struct vm_area_struct *vma)
> {
> - static struct file_operations vmfile_fops;
> + static const struct file_operations vmfile_fops;
You haven't compiled this, have you ?
> struct ashmem_area *asma = file->private_data;
> int ret = 0;
>
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-07-15 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-07-15 19:49 [PATCH] media: usb: uvc: uvc_driver: Added a function pr_info() in uvc_driver and staging: android: Decleared file operation with const keyword in android keyword Saptarshi Patra
2021-07-15 20:04 ` Laurent Pinchart
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox