From: Marcel Holtmann <marcel@holtmann.org>
To: ofono@ofono.org
Subject: RE: [PATCH 2/6] stemodem: add default case
Date: Tue, 26 Oct 2010 18:24:55 +0200 [thread overview]
Message-ID: <1288110295.3613.25.camel@aeonflux> (raw)
In-Reply-To: <C358A26273CF2948B8BCDBA661A581782A7DBDF5BA@NOK-EUMSG-03.mgdnok.nokia.com>
[-- Attachment #1: Type: text/plain, Size: 1355 bytes --]
Hi Mika,
> > > diff --git a/drivers/stemodem/radio-settings.c
> > b/drivers/stemodem/radio-settings.c
> > > index 5b16ec0..a345975 100644
> > > --- a/drivers/stemodem/radio-settings.c
> > > +++ b/drivers/stemodem/radio-settings.c
> > > @@ -90,7 +90,7 @@ static gboolean
> > ofono_mode_to_ste_mode(enum ofono_radio_access_mode mode,
> > > case OFONO_RADIO_ACCESS_MODE_UMTS:
> > > *stemode = STE_RADIO_WCDMA_ONLY;
> > > return TRUE;
> > > - case OFONO_RADIO_ACCESS_MODE_LTE:
> > > + default:
> > > break;
> >
> > no default for enums please. I want the compiler to warn us about not
> > handled switch statements.
>
> That must be a new policy then, considering that stemodem is the only one that failed compilation. Feel free to fix this one. The first two patches in the set are unrelated to fast dormancy anyway.
that is the whole point here. You modified the enum and the compilation
should fail unless you add a statement for that new item.
Let me make this clear, I do want the compilation to fail here and the
STE driver is doing the right thing.
There might be other cases where this is not consistent. I would prefer
if that never happens, but somethings things slip through even close
code review. If you know other cases, please let me know and we fix them
as well here.
Regards
Marcel
next prev parent reply other threads:[~2010-10-26 16:24 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 15:31 [PATCH 0/6] Fast dormancy support Mika Liljeberg
2010-10-26 15:31 ` [PATCH 1/6] radio settings: fix mode initializion Mika Liljeberg
2010-10-28 3:27 ` Denis Kenzior
2010-10-26 15:31 ` [PATCH 2/6] stemodem: add default case Mika Liljeberg
2010-10-26 15:35 ` Marcel Holtmann
2010-10-26 15:43 ` Mika.Liljeberg
2010-10-26 16:24 ` Marcel Holtmann [this message]
2010-10-27 7:06 ` Mika.Liljeberg
2010-10-27 9:12 ` Marcel Holtmann
2010-10-26 15:31 ` [PATCH 3/6] radio settings: add FastDormancy property Mika Liljeberg
2010-10-28 3:27 ` Denis Kenzior
2010-10-28 13:32 ` Mika.Liljeberg
2010-10-28 15:19 ` Denis Kenzior
2010-10-29 8:52 ` Mika.Liljeberg
2010-10-29 14:34 ` Denis Kenzior
2010-11-01 9:18 ` Mika.Liljeberg
2010-10-26 15:31 ` [PATCH 4/6] test: add script to control fast dormancy Mika Liljeberg
2010-10-28 3:27 ` Denis Kenzior
2010-10-26 15:31 ` [PATCH 5/6] isimodem: add support for FastDormancy property Mika Liljeberg
2010-10-28 3:28 ` Denis Kenzior
2010-10-26 15:31 ` [PATCH 6/6] TODO: mark fast dormancy as done Mika Liljeberg
2010-10-28 3:28 ` Denis Kenzior
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=1288110295.3613.25.camel@aeonflux \
--to=marcel@holtmann.org \
--cc=ofono@ofono.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.