lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 24 Jan 2018 13:18:49 +0000
From:   James Hogan <jhogan@...nel.org>
To:     Jiaxun Yang <jiaxun.yang@...goat.com>
Cc:     Ralf Baechle <ralf@...ux-mips.org>,
        Huacai CHen <chenhc@...ote.com>, linux-mips@...ux-mips.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH v6 3/4] MIPS: Loongson64: Load platform device during boot

On Tue, Dec 26, 2017 at 11:26:01AM +0800, Jiaxun Yang wrote:
> This patch just add pdev during boot to load the platform driver
> 
> Signed-off-by: Jiaxun Yang <jiaxun.yang@...goat.com>
> ---
>  arch/mips/loongson64/lemote-2f/Makefile   |  2 +-
>  arch/mips/loongson64/lemote-2f/platform.c | 25 +++++++++++++++++++++++++
>  2 files changed, 26 insertions(+), 1 deletion(-)
>  create mode 100644 arch/mips/loongson64/lemote-2f/platform.c
> 
> diff --git a/arch/mips/loongson64/lemote-2f/Makefile b/arch/mips/loongson64/lemote-2f/Makefile
> index 08b8abcbfef5..31c90737b98c 100644
> --- a/arch/mips/loongson64/lemote-2f/Makefile
> +++ b/arch/mips/loongson64/lemote-2f/Makefile
> @@ -2,7 +2,7 @@
>  # Makefile for lemote loongson2f family machines
>  #
>  
> -obj-y += clock.o machtype.o irq.o reset.o ec_kb3310b.o
> +obj-y += clock.o machtype.o irq.o reset.o ec_kb3310b.o platform.o
>  
>  #
>  # Suspend Support
> diff --git a/arch/mips/loongson64/lemote-2f/platform.c b/arch/mips/loongson64/lemote-2f/platform.c
> new file mode 100644
> index 000000000000..e0007f6c456a
> --- /dev/null
> +++ b/arch/mips/loongson64/lemote-2f/platform.c
> @@ -0,0 +1,25 @@
> +/* SPDX-License-Identifier: GPL-2.0 */
> +/* 

Trailing whitespace

> +* Copyright (C) 2017 Jiaxun Yang <jiaxun.yang@...goat.com>
> +*
> +*/

Checkpatch complains about missing spaces to align the '*' on each line
of this block comment.

Cheers
James

> +
> +#include <linux/err.h>
> +#include <linux/platform_device.h>
> +
> +#include <asm/bootinfo.h>
> +
> +static struct platform_device yeeloong_pdev = {
> +	.name = "yeeloong_laptop",
> +	.id = -1,
> +};
> +
> +static int __init lemote2f_platform_init(void)
> +{
> +	if (mips_machtype != MACH_LEMOTE_YL2F89)
> +		return -ENODEV;
> +
> +	return platform_device_register(&yeeloong_pdev);
> +}
> +
> +arch_initcall(lemote2f_platform_init);
> -- 
> 2.15.1
> 

Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ