mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/imagination: Removed unused functions in pvr_fw_trace
@ 2023-12-04 13:36 Donald Robson
  2023-12-04 13:51 ` Donald Robson
  2023-12-04 13:55 ` Maxime Ripard
  0 siblings, 2 replies; 3+ messages in thread
From: Donald Robson @ 2023-12-04 13:36 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: frank.binns, donald.robson, matt.coster, maarten.lankhorst,
	mripard, tzimmermann, airlied, daniel, kernel test robot

Fixing the warning below due to an unused file level vtable. Removing
only this causes additional warnings for the now unused functions, so
I've removed those too.

>> drivers/gpu/drm/imagination/pvr_fw_trace.c:205:37: warning: 'pvr_fw_trace_group_mask_fops' defined but not used [-Wunused-const-variable=]
     205 | static const struct file_operations pvr_fw_trace_group_mask_fops = {
         |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202311302054.MVYPxFCE-lkp@intel.com/
Fixes: c98cc92ab6ce ("drm/imagination: Add firmware trace to debugfs")
Signed-off-by: Donald Robson <donald.robson@imgtec.com>
---
 drivers/gpu/drm/imagination/pvr_fw_trace.c | 44 ----------------------
 1 file changed, 44 deletions(-)

diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
index 87a42fb6ace6..30f41a10a0cf 100644
--- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
+++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
@@ -167,50 +167,6 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
 
 #if defined(CONFIG_DEBUG_FS)
 
-static int fw_trace_group_mask_show(struct seq_file *m, void *data)
-{
-	struct pvr_device *pvr_dev = m->private;
-
-	seq_printf(m, "%08x\n", pvr_dev->fw_dev.fw_trace.group_mask);
-
-	return 0;
-}
-
-static int fw_trace_group_mask_open(struct inode *inode, struct file *file)
-{
-	return single_open(file, fw_trace_group_mask_show, inode->i_private);
-}
-
-static ssize_t fw_trace_group_mask_write(struct file *file, const char __user *ubuf, size_t len,
-					 loff_t *offp)
-{
-	struct seq_file *m = file->private_data;
-	struct pvr_device *pvr_dev = m->private;
-	u32 new_group_mask;
-	int err;
-
-	err = kstrtouint_from_user(ubuf, len, 0, &new_group_mask);
-	if (err)
-		return err;
-
-	err = update_logtype(pvr_dev, new_group_mask);
-	if (err)
-		return err;
-
-	pvr_dev->fw_dev.fw_trace.group_mask = new_group_mask;
-
-	return (ssize_t)len;
-}
-
-static const struct file_operations pvr_fw_trace_group_mask_fops = {
-	.owner = THIS_MODULE,
-	.open = fw_trace_group_mask_open,
-	.read = seq_read,
-	.write = fw_trace_group_mask_write,
-	.llseek = default_llseek,
-	.release = single_release,
-};
-
 struct pvr_fw_trace_seq_data {
 	/** @buffer: Pointer to copy of trace data. */
 	u32 *buffer;
-- 
2.25.1


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

* Re: [PATCH 1/2] drm/imagination: Removed unused functions in pvr_fw_trace
  2023-12-04 13:36 [PATCH 1/2] drm/imagination: Removed unused functions in pvr_fw_trace Donald Robson
@ 2023-12-04 13:51 ` Donald Robson
  2023-12-04 13:55 ` Maxime Ripard
  1 sibling, 0 replies; 3+ messages in thread
From: Donald Robson @ 2023-12-04 13:51 UTC (permalink / raw)
  To: dri-devel, linux-kernel
  Cc: lkp, tzimmermann, Matt Coster, airlied, Frank Binns,
	maarten.lankhorst, daniel, mripard

Just to clarify, there is no [PATCH 2/2].  I made the patch from the wrong branch
and didn't notice format-patch had picked up another commit.

Thanks,
Donald

On Mon, 2023-12-04 at 13:36 +0000, Donald Robson wrote:
> *** NOTE: This is an internal email from Imagination Technologies ***
> 
> 
> 
> 
> Fixing the warning below due to an unused file level vtable. Removing
> only this causes additional warnings for the now unused functions, so
> I've removed those too.
> 
> > > drivers/gpu/drm/imagination/pvr_fw_trace.c:205:37: warning: 'pvr_fw_trace_group_mask_fops' defined but not used [-Wunused-const-variable=]
>      205 | static const struct file_operations pvr_fw_trace_group_mask_fops = {
>          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202311302054.MVYPxFCE-lkp@intel.com/
> Fixes: c98cc92ab6ce ("drm/imagination: Add firmware trace to debugfs")
> Signed-off-by: Donald Robson <donald.robson@imgtec.com>
> ---
>  drivers/gpu/drm/imagination/pvr_fw_trace.c | 44 ----------------------
>  1 file changed, 44 deletions(-)
> 
> diff --git a/drivers/gpu/drm/imagination/pvr_fw_trace.c b/drivers/gpu/drm/imagination/pvr_fw_trace.c
> index 87a42fb6ace6..30f41a10a0cf 100644
> --- a/drivers/gpu/drm/imagination/pvr_fw_trace.c
> +++ b/drivers/gpu/drm/imagination/pvr_fw_trace.c
> @@ -167,50 +167,6 @@ update_logtype(struct pvr_device *pvr_dev, u32 group_mask)
> 
>  #if defined(CONFIG_DEBUG_FS)
> 
> -static int fw_trace_group_mask_show(struct seq_file *m, void *data)
> -{
> -       struct pvr_device *pvr_dev = m->private;
> -
> -       seq_printf(m, "%08x\n", pvr_dev->fw_dev.fw_trace.group_mask);
> -
> -       return 0;
> -}
> -
> -static int fw_trace_group_mask_open(struct inode *inode, struct file *file)
> -{
> -       return single_open(file, fw_trace_group_mask_show, inode->i_private);
> -}
> -
> -static ssize_t fw_trace_group_mask_write(struct file *file, const char __user *ubuf, size_t len,
> -                                        loff_t *offp)
> -{
> -       struct seq_file *m = file->private_data;
> -       struct pvr_device *pvr_dev = m->private;
> -       u32 new_group_mask;
> -       int err;
> -
> -       err = kstrtouint_from_user(ubuf, len, 0, &new_group_mask);
> -       if (err)
> -               return err;
> -
> -       err = update_logtype(pvr_dev, new_group_mask);
> -       if (err)
> -               return err;
> -
> -       pvr_dev->fw_dev.fw_trace.group_mask = new_group_mask;
> -
> -       return (ssize_t)len;
> -}
> -
> -static const struct file_operations pvr_fw_trace_group_mask_fops = {
> -       .owner = THIS_MODULE,
> -       .open = fw_trace_group_mask_open,
> -       .read = seq_read,
> -       .write = fw_trace_group_mask_write,
> -       .llseek = default_llseek,
> -       .release = single_release,
> -};
> -
>  struct pvr_fw_trace_seq_data {
>         /** @buffer: Pointer to copy of trace data. */
>         u32 *buffer;
> --
> 2.25.1
> 

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

* Re: [PATCH 1/2] drm/imagination: Removed unused functions in pvr_fw_trace
  2023-12-04 13:36 [PATCH 1/2] drm/imagination: Removed unused functions in pvr_fw_trace Donald Robson
  2023-12-04 13:51 ` Donald Robson
@ 2023-12-04 13:55 ` Maxime Ripard
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Ripard @ 2023-12-04 13:55 UTC (permalink / raw)
  To: Donald Robson
  Cc: dri-devel, linux-kernel, frank.binns, matt.coster,
	maarten.lankhorst, tzimmermann, airlied, daniel,
	kernel test robot

[-- Attachment #1: Type: text/plain, Size: 960 bytes --]

Hi,

On Mon, Dec 04, 2023 at 01:36:11PM +0000, Donald Robson wrote:
> Fixing the warning below due to an unused file level vtable. Removing
> only this causes additional warnings for the now unused functions, so
> I've removed those too.
> 
> >> drivers/gpu/drm/imagination/pvr_fw_trace.c:205:37: warning: 'pvr_fw_trace_group_mask_fops' defined but not used [-Wunused-const-variable=]
>      205 | static const struct file_operations pvr_fw_trace_group_mask_fops = {
>          |                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202311302054.MVYPxFCE-lkp@intel.com/
> Fixes: c98cc92ab6ce ("drm/imagination: Add firmware trace to debugfs")

That commit doesn't exist (upstream).

You made that mistake on the 5 patches you sent last week too but I
forgot to tell you about it. Are you working from a private branch?

Maxime

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

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

end of thread, other threads:[~2023-12-04 13:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-04 13:36 [PATCH 1/2] drm/imagination: Removed unused functions in pvr_fw_trace Donald Robson
2023-12-04 13:51 ` Donald Robson
2023-12-04 13:55 ` Maxime Ripard

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

all inboxes | Powered by JetHome®