linux-api.vger.kernel.org archive mirror
 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.

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

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cover.1433792665.git.mchehab@osg.samsung.com>
     [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   ` [PATCH 15/26] [media] DocBook: better document the DVB-S2 rolloff factor 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   ` [PATCH 19/26] [media] frontend: Move legacy API enums/structs to the end Mauro Carvalho Chehab
2015-06-08 19:54   ` [PATCH 20/26] [media] frontend: move legacy typedefs " 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   ` [PATCH 23/26] [media] dvb: frontend.h: improve dvb_frontent_parameters comment 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   ` [PATCH 25/26] [media] dvb: dmx.h: don't use anonymous enums 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
     [not found]   ` <336c59e13064f2fa872a1682268f1995deb18fa5.1433792665.git.mchehab-JPH+aEBZ4P+UEJcrhfAQsw@public.gmane.org>
2015-06-08 20:03     ` Joe Perches [this message]
     [not found]       ` <1433793783.2730.9.camel-6d6DIl74uiNBDgjK7y7TUQ@public.gmane.org>
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-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).