From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752517AbbJFKSo (ORCPT ); Tue, 6 Oct 2015 06:18:44 -0400 Received: from mail-io0-f173.google.com ([209.85.223.173]:32995 "EHLO mail-io0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751653AbbJFKSm (ORCPT ); Tue, 6 Oct 2015 06:18:42 -0400 MIME-Version: 1.0 In-Reply-To: <20151006090959.GO21513@n2100.arm.linux.org.uk> References: <1444064531-25607-1-git-send-email-suzuki.poulose@arm.com> <1444064531-25607-22-git-send-email-suzuki.poulose@arm.com> <20151006090959.GO21513@n2100.arm.linux.org.uk> Date: Tue, 6 Oct 2015 11:18:42 +0100 Message-ID: Subject: Re: [PATCH v2 21/22] arm64: cpuinfo: Expose MIDR_EL1 and REVIDR_EL1 to sysfs From: Steve Capper To: Russell King - ARM Linux Cc: "Suzuki K. Poulose" , "linux-arm-kernel@lists.infradead.org" , Mark Rutland , Vladimir.Murzin@arm.com, Ard Biesheuvel , Marc Zyngier , Catalin Marinas , Will Deacon , "linux-kernel@vger.kernel.org" , Edward Nevill , aph@redhat.com, james.morse@arm.com, Andre Przywara , dave.martin@arm.com Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 6 October 2015 at 10:09, Russell King - ARM Linux wrote: > On Mon, Oct 05, 2015 at 06:02:10PM +0100, Suzuki K. Poulose wrote: >> +static int __init cpuinfo_regs_init(void) >> +{ >> + int cpu, ret; >> + >> + for_each_present_cpu(cpu) { >> + struct device *dev = get_cpu_device(cpu); >> + >> + if (!dev) >> + return -1; > > NAK. Go figure out why, I'm too lazy to tell you. I will correct the return code to be -ENODEV. Was that the reasoning behind the NAK? > >> + >> + ret = sysfs_create_group(&dev->kobj, &cpuregs_attr_group); >> + if (ret) >> + return ret; >> + } >> + >> + return 0; >> +} >> + >> +device_initcall(cpuinfo_regs_init); >> -- >> 1.7.9.5