[U-Boot] [PATCH] common: miiphyutil: no need to check name of mii_dev

The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan Peng.Fan@freescale.com Cc: Joe Hershberger joe.hershberger@ni.com Cc: Simon Glass sjg@chromium.org Cc: Bin Meng bmeng.cn@gmail.com --- common/miiphyutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index e499b58..0811e09 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -159,7 +159,7 @@ void mdio_free(struct mii_dev *bus)
int mdio_register(struct mii_dev *bus) { - if (!bus || !bus->name || !bus->read || !bus->write) + if (!bus || !bus->read || !bus->write) return -1;
/* check if we have unique name */

On 24 November 2015 at 02:03, Peng Fan Peng.Fan@freescale.com wrote:
The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan Peng.Fan@freescale.com Cc: Joe Hershberger joe.hershberger@ni.com Cc: Simon Glass sjg@chromium.org Cc: Bin Meng bmeng.cn@gmail.com
common/miiphyutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Simon Glass sjg@chromium.org

Hi Peng,
On Tue, Nov 24, 2015 at 3:03 AM, Peng Fan Peng.Fan@freescale.com wrote:
The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan Peng.Fan@freescale.com Cc: Joe Hershberger joe.hershberger@ni.com Cc: Simon Glass sjg@chromium.org Cc: Bin Meng bmeng.cn@gmail.com
Acked-by: Joe Hershberger joe.hershberger@ni.com

On Tue, Nov 24, 2015 at 5:03 PM, Peng Fan Peng.Fan@freescale.com wrote:
The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan Peng.Fan@freescale.com Cc: Joe Hershberger joe.hershberger@ni.com Cc: Simon Glass sjg@chromium.org Cc: Bin Meng bmeng.cn@gmail.com
common/miiphyutil.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index e499b58..0811e09 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -159,7 +159,7 @@ void mdio_free(struct mii_dev *bus)
int mdio_register(struct mii_dev *bus) {
if (!bus || !bus->name || !bus->read || !bus->write)
if (!bus || !bus->read || !bus->write) return -1; /* check if we have unique name */
--
Reviewed-by: Bin Meng bmeng.cn@gmail.com

On Tue, Nov 24, 2015 at 05:03:47PM +0800, Peng Fan wrote:
The entry name of mii_dev is an array not pointer, so no need to check.
Signed-off-by: Peng Fan Peng.Fan@freescale.com Cc: Joe Hershberger joe.hershberger@ni.com Cc: Simon Glass sjg@chromium.org Cc: Bin Meng bmeng.cn@gmail.com Reviewed-by: Simon Glass sjg@chromium.org Acked-by: Joe Hershberger joe.hershberger@ni.com Reviewed-by: Bin Meng bmeng.cn@gmail.com
Applied to u-boot/master, thanks!
participants (5)
-
Bin Meng
-
Joe Hershberger
-
Peng Fan
-
Simon Glass
-
Tom Rini