All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
To: Mauro Carvalho Chehab <mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
Cc: Linux Media Mailing List
	<linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>,
	Antti Palosaari <crope-X3B1VOXEql0@public.gmane.org>,
	Jemma Denson <jdenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Patrick Boettcher
	<patrick.boettcher-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>,
	Michael Krufky <mkrufky-dJidKbW2IEtAfugRpC6u6w@public.gmane.org>,
	Malcolm Priestley
	<tvboxspy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Stefan Richter
	<stefanr-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org>,
	Greg Kroah-Hartman
	<gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org>,
	Shuah Khan <shuah.kh-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>,
	Akihiro Tsukada <tskd08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Martin Kepplinger
	<martink-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org>,
	Richard Vollkommer
	<linux-tHsjnVUC+Ghl57MIdRCFDg@public.gmane.org>,
	Hans Verkuil
	<hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org>,
	Geert Uytterhoeven
	<geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>,
	Julia Lawall <julia.lawall-L2FTfq7BK8M@public.gmane.org>,
	Himangi Saraogi
	<himangi774-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kees Cook <keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	Heinrich Schuchardt <xypron.glpk-Mmb7MZpHnFY@public.gmane.org>,
	Cheolhyun Park
	<pch851130-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Markus Elfring
	<elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org>,
	Benoit
Subject: Re: [PATCH 18/26] [media] dvb: Get rid of typedev usage for enums
Date: Mon, 08 Jun 2015 13:03:03 -0700	[thread overview]
Message-ID: <1433793783.2730.9.camel@perches.com> (raw)
In-Reply-To: <336c59e13064f2fa872a1682268f1995deb18fa5.1433792665.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>

On Mon, 2015-06-08 at 16:54 -0300, Mauro Carvalho Chehab wrote:
> The DVB API was originally defined using typedefs. This is against
> Kernel CodingStyle, and there's no good usage here. While we can't
> remove its usage on userspace, we can avoid its usage in Kernelspace.
> 
> So, let's do it.
> 
> This patch was generated by this shell script:
> 
> 	for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done

Seems sensible, thanks.

> While here, make CodingStyle fixes on the affected lines.

Trivial note examples:

> diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c
[]
> @@ -39,7 +39,8 @@ static int flexcop_fe_request_firmware(struct dvb_frontend *fe,
>  
>  /* lnb control */
>  #if FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)
> -static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
> +static int flexcop_set_voltage(struct dvb_frontend *fe,
> +			       enum fe_sec_voltage voltage)

Aligned to open paren.

> @@ -157,7 +158,7 @@ static int flexcop_diseqc_send_master_cmd(struct dvb_frontend *fe,
>  }
>  
>  static int flexcop_diseqc_send_burst(struct dvb_frontend *fe,
> -	fe_sec_mini_cmd_t minicmd)
> +	enum fe_sec_mini_cmd minicmd)

Not aligned to open paren.

Why some and not all?

> diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h
[]
> @@ -40,7 +40,7 @@ struct smsdvb_client_t {
>  	struct dmxdev           dmxdev;
>  	struct dvb_frontend     frontend;
>  
> -	fe_status_t             fe_status;
> +	enum fe_status             fe_status;

Maybe realign these too.

WARNING: multiple messages have this Message-ID (diff)
From: Joe Perches <joe@perches.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: "Linux Media Mailing List" <linux-media@vger.kernel.org>,
	"Mauro Carvalho Chehab" <mchehab@infradead.org>,
	"Antti Palosaari" <crope@iki.fi>,
	"Jemma Denson" <jdenson@gmail.com>,
	"Patrick Boettcher" <patrick.boettcher@posteo.de>,
	"Michael Krufky" <mkrufky@linuxtv.org>,
	"Malcolm Priestley" <tvboxspy@gmail.com>,
	"Stefan Richter" <stefanr@s5r6.in-berlin.de>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Shuah Khan" <shuah.kh@samsung.com>,
	"Akihiro Tsukada" <tskd08@gmail.com>,
	"Martin Kepplinger" <martink@posteo.de>,
	"Richard Vollkommer" <linux@hauppauge.com>,
	"Hans Verkuil" <hans.verkuil@cisco.com>,
	"Geert Uytterhoeven" <geert+renesas@glider.be>,
	"Julia Lawall" <julia.lawall@lip6.fr>,
	"Himangi Saraogi" <himangi774@gmail.com>,
	"Kees Cook" <keescook@chromium.org>,
	"Heinrich Schuchardt" <xypron.glpk@gmx.de>,
	"Cheolhyun Park" <pch851130@gmail.com>,
	"Markus Elfring" <elfring@users.sourceforge.net>,
	"Benoit Taine" <benoit.taine@lip6.fr>,
	"Ulrich Eckhardt" <uli-lirc@uli-eckhardt.de>,
	"Fred Richter" <frichter@hauppauge.com>,
	"Sakari Ailus" <sakari.ailus@linux.intel.com>,
	"Hans Wennborg" <hans@hanshq.net>,
	"Arnd Bergmann" <arnd@arndb.de>,
	"Matthias Schwarzott" <zzam@gentoo.org>,
	"Christian Engelmayer" <cengelma@gmx.at>,
	"Luis de Bethencourt" <luis.bg@samsung.com>,
	"Dan Carpenter" <dan.carpenter@oracle.com>,
	"Asaf Vertz" <asaf.vertz@tandemg.com>,
	"Emil Goode" <emilgoode@gmail.com>,
	"Maks Naumov" <maksqwe1@ukr.net>,
	"Olli Salonen" <olli.salonen@iki.fi>,
	"Nibble Max" <nibble.max@gmail.com>,
	"James Harper" <james.harper@ejbdigital.com.au>,
	"David Härdeman" <david@hardeman.nu>,
	"Pawel Osciak" <pawel@osciak.com>,
	"Randy Dunlap" <rdunlap@infradead.org>,
	"Jiri Kosina" <jkosina@suse.cz>,
	"Masanari Iida" <standby24x7@gmail.com>,
	"Thomas Reitmayr" <treitmayr@devbase.at>,
	"Evgeny Plehov" <EvgenyPlehov@ukr.net>,
	CrazyCat <crazycat69@narod.ru>,
	"Fabian Frederick" <fabf@skynet.be>,
	"Andrew Morton" <akpm@linux-foundation.org>,
	linux1394-devel@lists.sourceforge.net,
	devel@driverdev.osuosl.org, linux-api@vger.kernel.org
Subject: Re: [PATCH 18/26] [media] dvb: Get rid of typedev usage for enums
Date: Mon, 08 Jun 2015 13:03:03 -0700	[thread overview]
Message-ID: <1433793783.2730.9.camel@perches.com> (raw)
In-Reply-To: <336c59e13064f2fa872a1682268f1995deb18fa5.1433792665.git.mchehab@osg.samsung.com>

On Mon, 2015-06-08 at 16:54 -0300, Mauro Carvalho Chehab wrote:
> The DVB API was originally defined using typedefs. This is against
> Kernel CodingStyle, and there's no good usage here. While we can't
> remove its usage on userspace, we can avoid its usage in Kernelspace.
> 
> So, let's do it.
> 
> This patch was generated by this shell script:
> 
> 	for j in $(grep typedef include/uapi/linux/dvb/frontend.h |cut -d' ' -f 3); do for i in $(find drivers/media -name '*.[ch]' -type f) $(find drivers/staging/media -name '*.[ch]' -type f); do sed "s,${j}_t,enum $j," <$i >a && mv a $i; done; done

Seems sensible, thanks.

> While here, make CodingStyle fixes on the affected lines.

Trivial note examples:

> diff --git a/drivers/media/common/b2c2/flexcop-fe-tuner.c b/drivers/media/common/b2c2/flexcop-fe-tuner.c
[]
> @@ -39,7 +39,8 @@ static int flexcop_fe_request_firmware(struct dvb_frontend *fe,
>  
>  /* lnb control */
>  #if FE_SUPPORTED(MT312) || FE_SUPPORTED(STV0299)
> -static int flexcop_set_voltage(struct dvb_frontend *fe, fe_sec_voltage_t voltage)
> +static int flexcop_set_voltage(struct dvb_frontend *fe,
> +			       enum fe_sec_voltage voltage)

Aligned to open paren.

> @@ -157,7 +158,7 @@ static int flexcop_diseqc_send_master_cmd(struct dvb_frontend *fe,
>  }
>  
>  static int flexcop_diseqc_send_burst(struct dvb_frontend *fe,
> -	fe_sec_mini_cmd_t minicmd)
> +	enum fe_sec_mini_cmd minicmd)

Not aligned to open paren.

Why some and not all?

> diff --git a/drivers/media/common/siano/smsdvb.h b/drivers/media/common/siano/smsdvb.h
[]
> @@ -40,7 +40,7 @@ struct smsdvb_client_t {
>  	struct dmxdev           dmxdev;
>  	struct dvb_frontend     frontend;
>  
> -	fe_status_t             fe_status;
> +	enum fe_status             fe_status;

Maybe realign these too.



  parent reply	other threads:[~2015-06-08 20:03 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-08 19:53 [PATCH 00/26] More DVB Docbook improvements Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 01/26] [media] DocBook: handle enums on frontend.h Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 02/26] [media] DocBook: Add entry IDs for enum fe_caps Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 03/26] [media] DocBook: add entry IDs for enum fe_sec_mini_cmd Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 04/26] [media] DocBook: add entry IDs for enum fe_status Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 05/26] [media] DocBook: add entry IDs for enum fe_sec_tone_mode Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 06/26] [media] Docbook: add entry IDs for enum fe_sec_voltage Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 07/26] [media] DocBook: Add entry IDs for the enums defined at dvbproperty.xml Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 08/26] [media] DocBook: Better document DTMB time interleaving Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 09/26] [media] DocBook: add IDs for enum fe_bandwidth Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 10/26] [media] DocBook: remove a wrong cut-and-paste data Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 11/26] [media] DocBook: add placeholders for ATSC M/H properties Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 12/26] [media] DocBook: Add documentation " Mauro Carvalho Chehab
2015-06-08 19:53 ` [PATCH 14/26] [media] DocBook: Remove duplicated documentation for SEC_VOLTAGE_* Mauro Carvalho Chehab
2015-06-08 19:54 ` [PATCH 16/26] [media] DocBook: properly document the delivery systems Mauro Carvalho Chehab
2015-06-08 19:54 ` [PATCH 18/26] [media] dvb: Get rid of typedev usage for enums Mauro Carvalho Chehab
2015-06-08 19:54   ` Mauro Carvalho Chehab
     [not found]   ` <336c59e13064f2fa872a1682268f1995deb18fa5.1433792665.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2015-06-08 20:03     ` Joe Perches [this message]
2015-06-08 20:03       ` Joe Perches
     [not found]       ` <1433793783.2730.9.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
2015-06-09 14:03         ` Mauro Carvalho Chehab
2015-06-09 14:03           ` Mauro Carvalho Chehab
     [not found]           ` <20150609110334.3c9a63b1-+RedX5hVuTR+urZeOPWqwQ@public.gmane.org>
2015-06-09 14:06             ` Mauro Carvalho Chehab
2015-06-09 14:06               ` Mauro Carvalho Chehab
2015-06-08 20:52   ` Stefan Richter
2015-06-08 19:54 ` [PATCH 21/26] [media] DocBook: Remove comments before parsing enum values Mauro Carvalho Chehab
     [not found] ` <cover.1433792665.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2015-06-08 19:53   ` [PATCH 13/26] [media] DocBook: document DVB-S2 pilot in a table Mauro Carvalho Chehab
2015-06-08 19:53     ` Mauro Carvalho Chehab
2015-06-08 19:53   ` [PATCH 15/26] [media] DocBook: better document the DVB-S2 rolloff factor Mauro Carvalho Chehab
2015-06-08 19:53     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 17/26] [media] DocBook: add xrefs for enum fe_type Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 19/26] [media] frontend: Move legacy API enums/structs to the end Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 20/26] [media] frontend: move legacy typedefs " Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 22/26] [media] frontend: Fix a typo at the comments Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 23/26] [media] dvb: frontend.h: improve dvb_frontent_parameters comment Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 24/26] [media] dvb: frontend.h: add a note for the deprecated enums/structs Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 25/26] [media] dvb: dmx.h: don't use anonymous enums Mauro Carvalho Chehab
2015-06-08 19:54     ` Mauro Carvalho Chehab
2015-06-08 19:54 ` [PATCH 26/26] [media] DocBook: Change format for enum dmx_output documentation Mauro Carvalho Chehab

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=1433793783.2730.9.camel@perches.com \
    --to=joe-6d6dil74uinbdgjk7y7tuq@public.gmane.org \
    --cc=crope-X3B1VOXEql0@public.gmane.org \
    --cc=elfring-Rn4VEauK+AKRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org \
    --cc=gregkh-hQyY1W1yCW8ekmWlsbkhG0B+6BGkLq7r@public.gmane.org \
    --cc=hans.verkuil-FYB4Gu1CFyUAvxtiuMwx3w@public.gmane.org \
    --cc=himangi774-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=jdenson-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=julia.lawall-L2FTfq7BK8M@public.gmane.org \
    --cc=keescook-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tHsjnVUC+Ghl57MIdRCFDg@public.gmane.org \
    --cc=martink-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org \
    --cc=mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org \
    --cc=mchehab-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org \
    --cc=mkrufky-dJidKbW2IEtAfugRpC6u6w@public.gmane.org \
    --cc=patrick.boettcher-1KBjaw7Xf1+zQB+pC5nmwQ@public.gmane.org \
    --cc=pch851130-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=shuah.kh-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org \
    --cc=stefanr-MtYdepGKPcBMYopoZt5u/LNAH6kLmebB@public.gmane.org \
    --cc=tskd08-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=tvboxspy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    --cc=xypron.glpk-Mmb7MZpHnFY@public.gmane.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.