* [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through [not found] <20190807100803.63007737@canb.auug.org.au> @ 2019-08-07 1:24 ` Bjorn Andersson 2019-08-07 1:40 ` Gustavo A. R. Silva 2019-08-07 1:50 ` Stephen Rothwell 2019-08-07 2:23 ` [PATCH v2] " Bjorn Andersson 1 sibling, 2 replies; 6+ messages in thread From: Bjorn Andersson @ 2019-08-07 1:24 UTC (permalink / raw) To: Andy Gross, Stephen Rothwell Cc: linux-arm-msm, linux-kernel, Linux Next Mailing List Introduce fall through annotations in the switch statements of socinfo_debugfs_init() to silence compiler warnings. Fixes: 9c84c1e78634 ("soc: qcom: socinfo: Expose custom attributes") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> --- drivers/soc/qcom/socinfo.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 855353bed19e..f0ca9d7c7966 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -323,17 +323,23 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_x32("raw_device_number", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.raw_device_num); + /* Fall through */ case SOCINFO_VERSION(0, 11): + /* Fall through */ case SOCINFO_VERSION(0, 10): + /* Fall through */ case SOCINFO_VERSION(0, 9): qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id); debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.foundry_id); + /* Fall through */ case SOCINFO_VERSION(0, 8): + /* Fall through */ case SOCINFO_VERSION(0, 7): DEBUGFS_ADD(info, pmic_model); DEBUGFS_ADD(info, pmic_die_rev); + /* Fall through */ case SOCINFO_VERSION(0, 6): qcom_socinfo->info.hw_plat_subtype = __le32_to_cpu(info->hw_plat_subtype); @@ -341,6 +347,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("hardware_platform_subtype", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.hw_plat_subtype); + /* Fall through */ case SOCINFO_VERSION(0, 5): qcom_socinfo->info.accessory_chip = __le32_to_cpu(info->accessory_chip); @@ -348,23 +355,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("accessory_chip", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.accessory_chip); + /* Fall through */ case SOCINFO_VERSION(0, 4): qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); debugfs_create_u32("platform_version", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.plat_ver); + /* Fall through */ case SOCINFO_VERSION(0, 3): qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); debugfs_create_u32("hardware_platform", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.hw_plat); + /* Fall through */ case SOCINFO_VERSION(0, 2): qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.raw_ver); + /* Fall through */ case SOCINFO_VERSION(0, 1): DEBUGFS_ADD(info, build_id); break; -- 2.18.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through 2019-08-07 1:24 ` [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through Bjorn Andersson @ 2019-08-07 1:40 ` Gustavo A. R. Silva 2019-08-07 1:50 ` Stephen Rothwell 1 sibling, 0 replies; 6+ messages in thread From: Gustavo A. R. Silva @ 2019-08-07 1:40 UTC (permalink / raw) To: Bjorn Andersson, Andy Gross, Stephen Rothwell Cc: linux-arm-msm, linux-kernel, Linux Next Mailing List Hi, On 8/6/19 8:24 PM, Bjorn Andersson wrote: > Introduce fall through annotations in the switch statements of > socinfo_debugfs_init() to silence compiler warnings. > This is enough to silence all the warnings: diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 855353bed19e..a39ea5061dc5 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -323,6 +323,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_x32("raw_device_number", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.raw_device_num); + /* Fall through */ case SOCINFO_VERSION(0, 11): case SOCINFO_VERSION(0, 10): case SOCINFO_VERSION(0, 9): @@ -330,10 +331,12 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.foundry_id); + /* Fall through */ case SOCINFO_VERSION(0, 8): case SOCINFO_VERSION(0, 7): DEBUGFS_ADD(info, pmic_model); DEBUGFS_ADD(info, pmic_die_rev); + /* Fall through */ case SOCINFO_VERSION(0, 6): qcom_socinfo->info.hw_plat_subtype = __le32_to_cpu(info->hw_plat_subtype); @@ -341,6 +344,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("hardware_platform_subtype", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.hw_plat_subtype); + /* Fall through */ case SOCINFO_VERSION(0, 5): qcom_socinfo->info.accessory_chip = __le32_to_cpu(info->accessory_chip); @@ -348,23 +352,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("accessory_chip", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.accessory_chip); + /* Fall through */ case SOCINFO_VERSION(0, 4): qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); debugfs_create_u32("platform_version", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.plat_ver); + /* Fall through */ case SOCINFO_VERSION(0, 3): qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); debugfs_create_u32("hardware_platform", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.hw_plat); + /* Fall through */ case SOCINFO_VERSION(0, 2): qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.raw_ver); + /* Fall through */ case SOCINFO_VERSION(0, 1): DEBUGFS_ADD(info, build_id); break; -- Gustavo > Fixes: 9c84c1e78634 ("soc: qcom: socinfo: Expose custom attributes") > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- > drivers/soc/qcom/socinfo.c | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c > index 855353bed19e..f0ca9d7c7966 100644 > --- a/drivers/soc/qcom/socinfo.c > +++ b/drivers/soc/qcom/socinfo.c > @@ -323,17 +323,23 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > debugfs_create_x32("raw_device_number", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.raw_device_num); > + /* Fall through */ > case SOCINFO_VERSION(0, 11): > + /* Fall through */ > case SOCINFO_VERSION(0, 10): > + /* Fall through */ > case SOCINFO_VERSION(0, 9): > qcom_socinfo->info.foundry_id = __le32_to_cpu(info->foundry_id); > > debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root, > &qcom_socinfo->info.foundry_id); > + /* Fall through */ > case SOCINFO_VERSION(0, 8): > + /* Fall through */ > case SOCINFO_VERSION(0, 7): > DEBUGFS_ADD(info, pmic_model); > DEBUGFS_ADD(info, pmic_die_rev); > + /* Fall through */ > case SOCINFO_VERSION(0, 6): > qcom_socinfo->info.hw_plat_subtype = > __le32_to_cpu(info->hw_plat_subtype); > @@ -341,6 +347,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > debugfs_create_u32("hardware_platform_subtype", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.hw_plat_subtype); > + /* Fall through */ > case SOCINFO_VERSION(0, 5): > qcom_socinfo->info.accessory_chip = > __le32_to_cpu(info->accessory_chip); > @@ -348,23 +355,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > debugfs_create_u32("accessory_chip", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.accessory_chip); > + /* Fall through */ > case SOCINFO_VERSION(0, 4): > qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); > > debugfs_create_u32("platform_version", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.plat_ver); > + /* Fall through */ > case SOCINFO_VERSION(0, 3): > qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); > > debugfs_create_u32("hardware_platform", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.hw_plat); > + /* Fall through */ > case SOCINFO_VERSION(0, 2): > qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); > > debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root, > &qcom_socinfo->info.raw_ver); > + /* Fall through */ > case SOCINFO_VERSION(0, 1): > DEBUGFS_ADD(info, build_id); > break; > ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through 2019-08-07 1:24 ` [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through Bjorn Andersson 2019-08-07 1:40 ` Gustavo A. R. Silva @ 2019-08-07 1:50 ` Stephen Rothwell 2019-08-07 2:18 ` Bjorn Andersson 1 sibling, 1 reply; 6+ messages in thread From: Stephen Rothwell @ 2019-08-07 1:50 UTC (permalink / raw) To: Bjorn Andersson Cc: Andy Gross, linux-arm-msm, linux-kernel, Linux Next Mailing List [-- Attachment #1: Type: text/plain, Size: 499 bytes --] Hi Bjorn, On Tue, 6 Aug 2019 18:24:57 -0700 Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > > qcom_socinfo->dbg_root, > &qcom_socinfo->info.raw_device_num); > + /* Fall through */ > case SOCINFO_VERSION(0, 11): > + /* Fall through */ > case SOCINFO_VERSION(0, 10): > + /* Fall through */ > case SOCINFO_VERSION(0, 9): I don't think you need the comment between consecutive "case"s - just where there is actual code. -- Cheers, Stephen Rothwell [-- Attachment #2: OpenPGP digital signature --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through 2019-08-07 1:50 ` Stephen Rothwell @ 2019-08-07 2:18 ` Bjorn Andersson 0 siblings, 0 replies; 6+ messages in thread From: Bjorn Andersson @ 2019-08-07 2:18 UTC (permalink / raw) To: Stephen Rothwell Cc: Andy Gross, linux-arm-msm, linux-kernel, Linux Next Mailing List On Tue 06 Aug 18:50 PDT 2019, Stephen Rothwell wrote: > Hi Bjorn, > > On Tue, 6 Aug 2019 18:24:57 -0700 Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > > > > qcom_socinfo->dbg_root, > > &qcom_socinfo->info.raw_device_num); > > + /* Fall through */ > > case SOCINFO_VERSION(0, 11): > > + /* Fall through */ > > case SOCINFO_VERSION(0, 10): > > + /* Fall through */ > > case SOCINFO_VERSION(0, 9): > > I don't think you need the comment between consecutive "case"s - just > where there is actual code. > You're right, will respin the patch. Thanks, Bjorn ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2] soc: qcom: socinfo: Annotate switch cases with fall through [not found] <20190807100803.63007737@canb.auug.org.au> 2019-08-07 1:24 ` [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through Bjorn Andersson @ 2019-08-07 2:23 ` Bjorn Andersson 2019-08-07 4:25 ` Vaishali Thakkar 1 sibling, 1 reply; 6+ messages in thread From: Bjorn Andersson @ 2019-08-07 2:23 UTC (permalink / raw) To: Andy Gross, Stephen Rothwell Cc: linux-arm-msm, linux-kernel, Linux Next Mailing List Introduce fall through annotations in the switch statements of socinfo_debugfs_init() to silence compiler warnings. Fixes: 9c84c1e78634 ("soc: qcom: socinfo: Expose custom attributes") Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> --- drivers/soc/qcom/socinfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c index 855353bed19e..a39ea5061dc5 100644 --- a/drivers/soc/qcom/socinfo.c +++ b/drivers/soc/qcom/socinfo.c @@ -323,6 +323,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_x32("raw_device_number", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.raw_device_num); + /* Fall through */ case SOCINFO_VERSION(0, 11): case SOCINFO_VERSION(0, 10): case SOCINFO_VERSION(0, 9): @@ -330,10 +331,12 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.foundry_id); + /* Fall through */ case SOCINFO_VERSION(0, 8): case SOCINFO_VERSION(0, 7): DEBUGFS_ADD(info, pmic_model); DEBUGFS_ADD(info, pmic_die_rev); + /* Fall through */ case SOCINFO_VERSION(0, 6): qcom_socinfo->info.hw_plat_subtype = __le32_to_cpu(info->hw_plat_subtype); @@ -341,6 +344,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("hardware_platform_subtype", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.hw_plat_subtype); + /* Fall through */ case SOCINFO_VERSION(0, 5): qcom_socinfo->info.accessory_chip = __le32_to_cpu(info->accessory_chip); @@ -348,23 +352,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, debugfs_create_u32("accessory_chip", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.accessory_chip); + /* Fall through */ case SOCINFO_VERSION(0, 4): qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); debugfs_create_u32("platform_version", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.plat_ver); + /* Fall through */ case SOCINFO_VERSION(0, 3): qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); debugfs_create_u32("hardware_platform", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.hw_plat); + /* Fall through */ case SOCINFO_VERSION(0, 2): qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root, &qcom_socinfo->info.raw_ver); + /* Fall through */ case SOCINFO_VERSION(0, 1): DEBUGFS_ADD(info, build_id); break; -- 2.18.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2] soc: qcom: socinfo: Annotate switch cases with fall through 2019-08-07 2:23 ` [PATCH v2] " Bjorn Andersson @ 2019-08-07 4:25 ` Vaishali Thakkar 0 siblings, 0 replies; 6+ messages in thread From: Vaishali Thakkar @ 2019-08-07 4:25 UTC (permalink / raw) To: Bjorn Andersson Cc: Andy Gross, Stephen Rothwell, linux-arm-msm, linux-kernel, Linux Next Mailing List On Wed, 7 Aug 2019 at 07:54, Bjorn Andersson <bjorn.andersson@linaro.org> wrote: > > Introduce fall through annotations in the switch statements of > socinfo_debugfs_init() to silence compiler warnings. Oops, I missed this. Thanks for fixing it! > Fixes: 9c84c1e78634 ("soc: qcom: socinfo: Expose custom attributes") > Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> > Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Vaishali Thakkar <vaishali.thakkar@linaro.org> > --- > drivers/soc/qcom/socinfo.c | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/drivers/soc/qcom/socinfo.c b/drivers/soc/qcom/socinfo.c > index 855353bed19e..a39ea5061dc5 100644 > --- a/drivers/soc/qcom/socinfo.c > +++ b/drivers/soc/qcom/socinfo.c > @@ -323,6 +323,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > debugfs_create_x32("raw_device_number", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.raw_device_num); > + /* Fall through */ > case SOCINFO_VERSION(0, 11): > case SOCINFO_VERSION(0, 10): > case SOCINFO_VERSION(0, 9): > @@ -330,10 +331,12 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > > debugfs_create_u32("foundry_id", 0400, qcom_socinfo->dbg_root, > &qcom_socinfo->info.foundry_id); > + /* Fall through */ > case SOCINFO_VERSION(0, 8): > case SOCINFO_VERSION(0, 7): > DEBUGFS_ADD(info, pmic_model); > DEBUGFS_ADD(info, pmic_die_rev); > + /* Fall through */ > case SOCINFO_VERSION(0, 6): > qcom_socinfo->info.hw_plat_subtype = > __le32_to_cpu(info->hw_plat_subtype); > @@ -341,6 +344,7 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > debugfs_create_u32("hardware_platform_subtype", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.hw_plat_subtype); > + /* Fall through */ > case SOCINFO_VERSION(0, 5): > qcom_socinfo->info.accessory_chip = > __le32_to_cpu(info->accessory_chip); > @@ -348,23 +352,27 @@ static void socinfo_debugfs_init(struct qcom_socinfo *qcom_socinfo, > debugfs_create_u32("accessory_chip", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.accessory_chip); > + /* Fall through */ > case SOCINFO_VERSION(0, 4): > qcom_socinfo->info.plat_ver = __le32_to_cpu(info->plat_ver); > > debugfs_create_u32("platform_version", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.plat_ver); > + /* Fall through */ > case SOCINFO_VERSION(0, 3): > qcom_socinfo->info.hw_plat = __le32_to_cpu(info->hw_plat); > > debugfs_create_u32("hardware_platform", 0400, > qcom_socinfo->dbg_root, > &qcom_socinfo->info.hw_plat); > + /* Fall through */ > case SOCINFO_VERSION(0, 2): > qcom_socinfo->info.raw_ver = __le32_to_cpu(info->raw_ver); > > debugfs_create_u32("raw_version", 0400, qcom_socinfo->dbg_root, > &qcom_socinfo->info.raw_ver); > + /* Fall through */ > case SOCINFO_VERSION(0, 1): > DEBUGFS_ADD(info, build_id); > break; > -- > 2.18.0 > ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2019-08-07 4:25 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- [not found] <20190807100803.63007737@canb.auug.org.au> 2019-08-07 1:24 ` [PATCH] soc: qcom: socinfo: Annotate switch cases with fall through Bjorn Andersson 2019-08-07 1:40 ` Gustavo A. R. Silva 2019-08-07 1:50 ` Stephen Rothwell 2019-08-07 2:18 ` Bjorn Andersson 2019-08-07 2:23 ` [PATCH v2] " Bjorn Andersson 2019-08-07 4:25 ` Vaishali Thakkar
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).