All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jimmy RUBIN <jimmy.rubin@stericsson.com>
To: linux-arm-kernel@lists.infradead.org
Subject: RE: [PATCH 08/10] MCDE: Add frame buffer device
Date: Thu, 25 Nov 2010 11:52:41 +0000	[thread overview]
Message-ID: <F45880696056844FA6A73F415B568C695365E671E5@EXDCVYMBSTM006.EQ1STM.local> (raw)
In-Reply-To: <201011121729.28354.arnd@arndb.de>

Hi,

> 
> On Wednesday 10 November 2010, Jimmy Rubin wrote:
> > +
> > +static struct platform_device mcde_fb_device = {
> > +	.name = "mcde_fb",
> > +	.id = -1,
> > +};
> 
> Do not introduce new static devices. We are trying to remove them and
> they will stop working. Why do you even need a device here if there is
> only one of them?

> 
> > +struct fb_info *mcde_fb_create(struct mcde_display_device *ddev,
> > +	u16 w, u16 h, u16 vw, u16 vh, enum mcde_ovly_pix_fmt
> pix_fmt,
> > +	u32 rotate)
> > +{
> 
> Here you have another device, which you could just use!

I will do that.

> 
> > +/* Overlay fbs' platform device */
> > +static int mcde_fb_probe(struct platform_device *pdev)
> > +{
> > +	return 0;
> > +}
> > +
> > +static int mcde_fb_remove(struct platform_device *pdev)
> > +{
> > +	return 0;
> > +}
> > +
> > +static struct platform_driver mcde_fb_driver = {
> > +	.probe  = mcde_fb_probe,
> > +	.remove = mcde_fb_remove,
> > +	.driver = {
> > +		.name  = "mcde_fb",
> > +		.owner = THIS_MODULE,
> > +	},
> > +};
> > +
> > +/* MCDE fb init */
> > +
> > +int __init mcde_fb_init(void)
> > +{
> > +	int ret;
> > +
> > +	ret = platform_driver_register(&mcde_fb_driver);
> > +	if (ret)
> > +		goto fb_driver_failed;
> > +	ret = platform_device_register(&mcde_fb_device);
> > +	if (ret)
> > +		goto fb_device_failed;
> > +
> > +	goto out;
> > +fb_device_failed:
> > +	platform_driver_unregister(&mcde_fb_driver);
> > +fb_driver_failed:
> > +out:
> > +	return ret;
> > +}
> > +
> > +void mcde_fb_exit(void)
> > +{
> > +	platform_device_unregister(&mcde_fb_device);
> > +	platform_driver_unregister(&mcde_fb_driver);
> > +}
> 
> This appears to be an entirely useless registration for something that
> does not exist and that you are not using anywhere ...

Will look into this and remove it.
> 
> > +
> > +#include <linux/fb.h>
> > +#include <linux/ioctl.h>
> > +#if !defined(__KERNEL__) && !defined(_KERNEL)
> > +#include <stdint.h>
> > +#else
> > +#include <linux/types.h>
> > +#endif
> > +
> > +#ifdef __KERNEL__
> > +#include "mcde_dss.h"
> > +#endif
> > +
> > +#ifdef __KERNEL__
> > +#define to_mcde_fb(x) ((struct mcde_fb *)(x)->par)
> 
> Everything in this file is enclosed in #ifdef __KERNEL__, and the file
> is not even exported. You can remove the #ifdef and the #else path
> everywhere AFAICT.

Agree, no IOCTLs there for the moment so only kernel include. 

/Jimmy

WARNING: multiple messages have this Message-ID (diff)
From: jimmy.rubin@stericsson.com (Jimmy RUBIN)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 08/10] MCDE: Add frame buffer device
Date: Thu, 25 Nov 2010 12:52:41 +0100	[thread overview]
Message-ID: <F45880696056844FA6A73F415B568C695365E671E5@EXDCVYMBSTM006.EQ1STM.local> (raw)
In-Reply-To: <201011121729.28354.arnd@arndb.de>

Hi,

> 
> On Wednesday 10 November 2010, Jimmy Rubin wrote:
> > +
> > +static struct platform_device mcde_fb_device = {
> > +	.name = "mcde_fb",
> > +	.id = -1,
> > +};
> 
> Do not introduce new static devices. We are trying to remove them and
> they will stop working. Why do you even need a device here if there is
> only one of them?

> 
> > +struct fb_info *mcde_fb_create(struct mcde_display_device *ddev,
> > +	u16 w, u16 h, u16 vw, u16 vh, enum mcde_ovly_pix_fmt
> pix_fmt,
> > +	u32 rotate)
> > +{
> 
> Here you have another device, which you could just use!

I will do that.

> 
> > +/* Overlay fbs' platform device */
> > +static int mcde_fb_probe(struct platform_device *pdev)
> > +{
> > +	return 0;
> > +}
> > +
> > +static int mcde_fb_remove(struct platform_device *pdev)
> > +{
> > +	return 0;
> > +}
> > +
> > +static struct platform_driver mcde_fb_driver = {
> > +	.probe  = mcde_fb_probe,
> > +	.remove = mcde_fb_remove,
> > +	.driver = {
> > +		.name  = "mcde_fb",
> > +		.owner = THIS_MODULE,
> > +	},
> > +};
> > +
> > +/* MCDE fb init */
> > +
> > +int __init mcde_fb_init(void)
> > +{
> > +	int ret;
> > +
> > +	ret = platform_driver_register(&mcde_fb_driver);
> > +	if (ret)
> > +		goto fb_driver_failed;
> > +	ret = platform_device_register(&mcde_fb_device);
> > +	if (ret)
> > +		goto fb_device_failed;
> > +
> > +	goto out;
> > +fb_device_failed:
> > +	platform_driver_unregister(&mcde_fb_driver);
> > +fb_driver_failed:
> > +out:
> > +	return ret;
> > +}
> > +
> > +void mcde_fb_exit(void)
> > +{
> > +	platform_device_unregister(&mcde_fb_device);
> > +	platform_driver_unregister(&mcde_fb_driver);
> > +}
> 
> This appears to be an entirely useless registration for something that
> does not exist and that you are not using anywhere ...

Will look into this and remove it.
> 
> > +
> > +#include <linux/fb.h>
> > +#include <linux/ioctl.h>
> > +#if !defined(__KERNEL__) && !defined(_KERNEL)
> > +#include <stdint.h>
> > +#else
> > +#include <linux/types.h>
> > +#endif
> > +
> > +#ifdef __KERNEL__
> > +#include "mcde_dss.h"
> > +#endif
> > +
> > +#ifdef __KERNEL__
> > +#define to_mcde_fb(x) ((struct mcde_fb *)(x)->par)
> 
> Everything in this file is enclosed in #ifdef __KERNEL__, and the file
> is not even exported. You can remove the #ifdef and the #else path
> everywhere AFAICT.

Agree, no IOCTLs there for the moment so only kernel include. 

/Jimmy

  reply	other threads:[~2010-11-25 11:52 UTC|newest]

Thread overview: 130+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-10 12:04 [PATCH 00/10] MCDE: Add frame buffer device driver Jimmy Rubin
2010-11-10 12:04 ` Jimmy Rubin
2010-11-10 12:04 ` Jimmy Rubin
2010-11-10 12:04 ` [PATCH 01/10] MCDE: Add hardware abstraction layer Jimmy Rubin
2010-11-10 12:04   ` Jimmy Rubin
2010-11-10 12:04   ` Jimmy Rubin
2010-11-10 12:04   ` [PATCH 02/10] MCDE: Add configuration registers Jimmy Rubin
2010-11-10 12:04     ` Jimmy Rubin
2010-11-10 12:04     ` Jimmy Rubin
2010-11-10 12:04     ` [PATCH 03/10] MCDE: Add pixel processing registers Jimmy Rubin
2010-11-10 12:04       ` Jimmy Rubin
2010-11-10 12:04       ` Jimmy Rubin
2010-11-10 12:04       ` [PATCH 04/10] MCDE: Add formatter registers Jimmy Rubin
2010-11-10 12:04         ` Jimmy Rubin
2010-11-10 12:04         ` Jimmy Rubin
2010-11-10 12:04         ` [PATCH 05/10] MCDE: Add dsi link registers Jimmy Rubin
2010-11-10 12:04           ` Jimmy Rubin
2010-11-10 12:04           ` Jimmy Rubin
2010-11-10 12:04           ` [PATCH 06/10] MCDE: Add generic display Jimmy Rubin
2010-11-10 12:04             ` Jimmy Rubin
2010-11-10 12:04             ` Jimmy Rubin
2010-11-10 12:04             ` [PATCH 07/10] MCDE: Add display subsystem framework Jimmy Rubin
2010-11-10 12:04               ` Jimmy Rubin
2010-11-10 12:04               ` Jimmy Rubin
2010-11-10 12:04               ` [PATCH 08/10] MCDE: Add frame buffer device Jimmy Rubin
2010-11-10 12:04                 ` Jimmy Rubin
2010-11-10 12:04                 ` Jimmy Rubin
2010-11-10 12:04                 ` [PATCH 09/10] MCDE: Add build files and bus Jimmy Rubin
2010-11-10 12:04                   ` Jimmy Rubin
2010-11-10 12:04                   ` Jimmy Rubin
2010-11-10 12:04                   ` [PATCH 10/10] ux500: MCDE: Add platform specific data Jimmy Rubin
2010-11-10 12:04                     ` Jimmy Rubin
2010-11-10 12:04                     ` Jimmy Rubin
2010-11-12 16:03                     ` Arnd Bergmann
2010-11-12 16:03                       ` Arnd Bergmann
2010-11-12 16:03                       ` Arnd Bergmann
2010-11-25 11:20                       ` Jimmy RUBIN
2010-11-25 11:20                         ` Jimmy RUBIN
2010-11-12 16:23                   ` [PATCH 09/10] MCDE: Add build files and bus Arnd Bergmann
2010-11-12 16:23                     ` Arnd Bergmann
2010-11-12 16:23                     ` Arnd Bergmann
2010-11-12 16:29                 ` [PATCH 08/10] MCDE: Add frame buffer device Arnd Bergmann
2010-11-12 16:29                   ` Arnd Bergmann
2010-11-12 16:29                   ` Arnd Bergmann
2010-11-25 11:52                   ` Jimmy RUBIN [this message]
2010-11-25 11:52                     ` Jimmy RUBIN
2010-11-12 16:38               ` [PATCH 07/10] MCDE: Add display subsystem framework Arnd Bergmann
2010-11-12 16:38                 ` Arnd Bergmann
2010-11-12 16:38                 ` Arnd Bergmann
2010-11-25  7:16                 ` Jimmy RUBIN
2010-11-25  7:16                   ` Jimmy RUBIN
2010-11-12 15:46       ` [PATCH 03/10] MCDE: Add pixel processing registers Arnd Bergmann
2010-11-12 15:46         ` Arnd Bergmann
2010-11-12 15:46         ` Arnd Bergmann
2010-11-12 15:14     ` [PATCH 02/10] MCDE: Add configuration registers Arnd Bergmann
2010-11-12 15:14       ` Arnd Bergmann
2010-11-12 15:14       ` Arnd Bergmann
2010-11-12 15:34       ` Russell King - ARM Linux
2010-11-12 15:34         ` Russell King - ARM Linux
2010-11-12 15:34         ` Russell King - ARM Linux
2010-11-15 14:25         ` Arnd Bergmann
2010-11-15 14:25           ` Arnd Bergmann
2010-11-15 14:25           ` Arnd Bergmann
2010-11-15 14:59           ` Russell King - ARM Linux
2010-11-15 14:59             ` Russell King - ARM Linux
2010-11-15 14:59             ` Russell King - ARM Linux
2010-11-15 18:24             ` Geert Uytterhoeven
2010-11-15 18:24               ` Geert Uytterhoeven
2010-11-15 18:24               ` Geert Uytterhoeven
2010-11-25 11:30       ` Jimmy RUBIN
2010-11-25 11:30         ` Jimmy RUBIN
2010-11-25 16:21         ` Arnd Bergmann
2010-11-25 16:21           ` Arnd Bergmann
2010-11-10 17:14   ` [PATCH 01/10] MCDE: Add hardware abstraction layer Joe Perches
2010-11-10 17:14     ` Joe Perches
2010-11-10 17:14     ` Joe Perches
2010-11-15  9:52     ` Jimmy RUBIN
2010-11-15  9:52       ` Jimmy RUBIN
2010-11-15  9:52       ` Jimmy RUBIN
2010-11-15 16:30       ` Joe Perches
2010-11-15 16:30         ` Joe Perches
2010-11-15 16:30         ` Joe Perches
2010-11-12 15:43   ` Arnd Bergmann
2010-11-12 15:43     ` Arnd Bergmann
2010-11-12 15:43     ` Arnd Bergmann
2010-11-16 15:29     ` Jimmy RUBIN
2010-11-16 15:29       ` Jimmy RUBIN
2010-11-16 15:29       ` Jimmy RUBIN
2010-11-16 16:12       ` Arnd Bergmann
2010-11-16 16:12         ` Arnd Bergmann
2010-11-16 16:12         ` Arnd Bergmann
2010-11-16 16:16         ` Arnd Bergmann
2010-11-16 16:16           ` Arnd Bergmann
2010-11-16 16:16           ` Arnd Bergmann
2010-11-16 19:46       ` Joe Perches
2010-11-16 19:46         ` Joe Perches
2010-11-16 19:46         ` Joe Perches
2010-11-17  9:55         ` Arnd Bergmann
2010-11-17  9:55           ` Arnd Bergmann
2010-11-17  9:55           ` Arnd Bergmann
2010-11-17 16:01           ` Joe Perches
2010-11-17 16:01             ` Joe Perches
2010-11-17 16:01             ` Joe Perches
2010-11-10 14:42 ` [PATCH 00/10] MCDE: Add frame buffer device driver Alex Deucher
2010-11-10 14:42   ` Alex Deucher
2010-11-10 14:42   ` Alex Deucher
2010-11-12 13:18   ` Jimmy RUBIN
2010-11-12 13:18     ` Jimmy RUBIN
2010-11-12 13:18     ` Jimmy RUBIN
2010-11-12 15:52     ` Alex Deucher
2010-11-12 15:52       ` Alex Deucher
2010-11-12 15:52       ` Alex Deucher
2010-11-12 16:46       ` Marcus LORENTZON
2010-11-12 16:46         ` Marcus LORENTZON
2010-11-12 16:46         ` Marcus LORENTZON
2010-11-12 17:22         ` Alex Deucher
2010-11-12 17:22           ` Alex Deucher
2010-11-12 17:22           ` Alex Deucher
2010-11-15 11:05           ` Michel Dänzer
2010-11-15 11:05             ` Michel Dänzer
2010-11-15 11:05             ` Michel Dänzer
2010-11-13 11:54         ` Hans Verkuil
2010-11-13 11:54           ` Hans Verkuil
2010-11-13 11:54           ` Hans Verkuil
2010-11-13 17:26           ` Marcus LORENTZON
2010-11-13 17:26             ` Marcus LORENTZON
2010-11-13 17:26             ` Marcus LORENTZON
2010-11-13 17:57             ` Hans Verkuil
2010-11-13 17:57               ` Hans Verkuil
2010-11-13 17:57               ` Hans Verkuil

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=F45880696056844FA6A73F415B568C695365E671E5@EXDCVYMBSTM006.EQ1STM.local \
    --to=jimmy.rubin@stericsson.com \
    --cc=linux-arm-kernel@lists.infradead.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.