From: Paul Bolle <pebolle@tiscali.nl>
To: Roy Pledge <Roy.Pledge@freescale.com>
Cc: linuxppc-dev@lists.ozlabs.org, scottwood@freescale.com,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 03/11] soc/fsl: Introduce the DPAA BMan portal driver
Date: Fri, 10 Jul 2015 15:32:43 +0200 [thread overview]
Message-ID: <1436535163.20619.216.camel@tiscali.nl> (raw)
In-Reply-To: <1436473322-21247-4-git-send-email-Roy.Pledge@freescale.com>
On do, 2015-07-09 at 16:21 -0400, Roy Pledge wrote:
> --- a/drivers/soc/fsl/qbman/Kconfig
> +++ b/drivers/soc/fsl/qbman/Kconfig
> +config FSL_DPA_PIRQ_FAST
> + bool
> + default y
First used in 04/11.
> +config FSL_DPA_PIRQ_SLOW
> + bool
> + default y
> +
> +config FSL_DPA_PORTAL_SHARE
> + bool
> + default y
As in 02/11: these three symbols function as aliases for FSL_DPA. Why
are they needed?
> config FSL_BMAN
> tristate "BMan device management"
> default n
> help
> FSL DPAA BMan driver
>
> +config FSL_BMAN_PORTAL
> + tristate "BMan portal(s)"
> + default n
> + help
> + FSL BMan portal driver
> --- /dev/null
> +++ b/drivers/soc/fsl/qbman/bman_api.c
> +struct bman_portal {
> + [...]
> +#ifdef CONFIG_FSL_DPA_CAN_WAIT_SYNC
This check will always evaluate to true, right? (I'll only report this
once.)
> + struct bman_pool *rcri_owned; /* only 1 release WAIT_SYNC at
> a time */
> +#endif
> +#ifdef CONFIG_FSL_DPA_PORTAL_SHARE
Ditto.
> + raw_spinlock_t sharing_lock; /* only used if is_shared */
> + int is_shared;
> + struct bman_portal *sharing_redirect;
> +#endif
> + [...]
> +};
> +const struct bman_portal_config *bman_get_portal_config(void)
> +{
> + [...]
> +}
I couldn't find callers of this function.
> +EXPORT_SYMBOL(bman_get_portal_config);
Nor users of this export, obviously.
> +
> +u32 bman_irqsource_get(void)
> +{
> + [...]
> +}
Ditto.
> +EXPORT_SYMBOL(bman_irqsource_get);
Ditto.
> +int bman_p_irqsource_add(struct bman_portal *p, __maybe_unused u32 bits)
> +{
> + [...]
> +}
> +EXPORT_SYMBOL(bman_p_irqsource_add);
There seem to be no users of this export.
> +int bman_irqsource_add(__maybe_unused u32 bits)
> +{
> + [...]
> +}
Unused.
> +EXPORT_SYMBOL(bman_irqsource_add);
Ditto.
> +int bman_irqsource_remove(u32 bits)
> +{
> + [...]
> +}
Ditto.
> +EXPORT_SYMBOL(bman_irqsource_remove);
Ditto.
> +u32 bman_poll_slow(void)
> +{
> + [...]
> +}
Ditto.
> +EXPORT_SYMBOL(bman_poll_slow);
Ditto.
> +void bman_poll(void)
> +{
> + [...]
> +}
Ditto.
> +EXPORT_SYMBOL(bman_poll);
Ditto.
> +static inline struct bm_rcr_entry *try_rel_start(struct bman_portal **p,
> +#ifdef CONFIG_FSL_DPA_CAN_WAIT
Always true, right?
> + __maybe_unused struct bman_pool *pool,
> +#endif
> + __maybe_unused unsigned long *irqflags,
> + __maybe_unused u32 flags)
And this is a, well, novel way to declare a function.
> +{
> + [...]
> +}
> +int bman_flush_stockpile(struct bman_pool *pool, u32 flags)
> +{
> + [...]
> +}
Unused function.
> +EXPORT_SYMBOL(bman_flush_stockpile);
So unused export too.
> +#ifdef CONFIG_FSL_BMAN
> +u32 bman_query_free_buffers(struct bman_pool *pool)
> +{
> + return bm_pool_free_buffers(pool->params.bpid);
> +}
> +EXPORT_SYMBOL(bman_query_free_buffers);
> +
> +int bman_update_pool_thresholds(struct bman_pool *pool, const u32 *thresholds)
> +{
> + u32 bpid;
> +
> + bpid = bman_get_params(pool)->bpid;
> +
> + return bm_pool_set(bpid, thresholds);
> +}
> +EXPORT_SYMBOL(bman_update_pool_thresholds);
More of the same.
> +#endif
> --- /dev/null
> +++ b/drivers/soc/fsl/qbman/bman_portal.c
>
> +module_driver(bman_portal_driver,
> + bman_portal_driver_register, platform_driver_unregister);
No MODULE_LICENSE() here, nor in the other files that make up this
module. So loading this module will trigger a warning and taint the
kernel.
> --- /dev/null
> +++ b/drivers/soc/fsl/qbman/bman_utils.c
> +EXPORT_SYMBOL(bman_alloc_bpid_range);
Unused export.
> +EXPORT_SYMBOL(bman_release_bpid_range);
Ditto.
> +EXPORT_SYMBOL(bman_seed_bpid_range);
Ditto.
> +int bman_reserve_bpid_range(u32 bpid, u32 count)
> +{
> + return dpaa_resource_reserve(&bpalloc, bpid, count);
> +}
> +EXPORT_SYMBOL(bman_reserve_bpid_range);
Because bman_reserve_bpid() is unused, see below, this function and this
export are unused too.
> --- /dev/null
> +++ b/drivers/soc/fsl/qbman/dpaa_resource.c
>
> +#if defined(CONFIG_FSL_BMAN_PORTAL) || defined(CONFIG_FSL_BMAN_PORTAL_MODULE)
#if IS_ENABLED(CONFIG_FSL_BMAN_PORTAL)
> +#ifdef DPAA_RESOURCE_DEBUG
Never defined. So DUMP() is dead code.
> --- a/drivers/soc/fsl/qbman/dpaa_sys.h
> +++ b/drivers/soc/fsl/qbman/dpaa_sys.h
>
> +#define CONFIG_TRY_BETTER_MEMCPY
Please replace the CONFIG_ prefix with something else.
> +#ifdef CONFIG_TRY_BETTER_MEMCPY
This will always be true, right?
> [...]
> +#else
> +#define copy_words memcpy
> +#define copy_shorts memcpy
> +#define copy_bytes memcpy
> +#endif
> --- /dev/null
> +++ b/include/soc/fsl/bman.h
> +static inline int bman_reserve_bpid(u32 bpid)
> +{
> + return bman_reserve_bpid_range(bpid, 1);
> +}
Unused.
Thanks,
Paul Bolle
next prev parent reply other threads:[~2015-07-10 13:32 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-09 20:21 [PATCH 00/11] Freescale DPAA QBMan Drivers Roy Pledge
2015-07-09 20:21 ` [PATCH 01/11] powerpc: re-add devm_ioremap_prot() Roy Pledge
2015-07-09 20:21 ` [PATCH 02/11] soc/fsl: Introduce DPAA BMan device management driver Roy Pledge
2015-07-10 8:38 ` Paul Bolle
2015-07-10 17:31 ` Scott Wood
2015-07-10 18:29 ` Roy Pledge
2015-07-10 18:50 ` Scott Wood
2015-07-10 11:36 ` Paul Bolle
2015-07-10 17:33 ` Scott Wood
2015-07-10 20:57 ` Roy Pledge
2015-07-10 21:12 ` Scott Wood
2015-07-09 20:21 ` [PATCH 03/11] soc/fsl: Introduce the DPAA BMan portal driver Roy Pledge
2015-07-10 13:32 ` Paul Bolle [this message]
2015-07-10 15:19 ` Roy Pledge
2015-07-10 16:47 ` Paul Bolle
2015-07-09 20:21 ` [PATCH 04/11] soc/fsl: Introduce drivers for the DPAA QMan Roy Pledge
2015-07-11 10:34 ` Paul Bolle
2015-07-09 20:21 ` [PATCH 05/11] soc/bman: Add self-tester for BMan driver Roy Pledge
2015-07-09 20:21 ` [PATCH 06/11] soc/qman: Add self-tester for QMan driver Roy Pledge
2015-07-09 20:21 ` [PATCH 07/11] soc/bman: Add debugfs support for the BMan driver Roy Pledge
2015-07-09 20:21 ` [PATCH 08/11] soc/qman: Add debugfs support for the QMan driver Roy Pledge
2015-07-09 20:22 ` [PATCH 09/11] soc/bman: Add HOTPLUG_CPU support to the BMan driver Roy Pledge
2015-07-09 20:22 ` [PATCH 10/11] soc/qman: Add HOTPLUG_CPU support to the QMan driver Roy Pledge
2015-07-09 20:22 ` [PATCH 11/11] soc/qman: add qman_delete_cgr_safe() Roy Pledge
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=1436535163.20619.216.camel@tiscali.nl \
--to=pebolle@tiscali.nl \
--cc=Roy.Pledge@freescale.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=netdev@vger.kernel.org \
--cc=scottwood@freescale.com \
/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
all inboxes | Powered by JetHome®