From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755848AbbDGPeO (ORCPT ); Tue, 7 Apr 2015 11:34:14 -0400 Received: from mail-wi0-f178.google.com ([209.85.212.178]:36845 "EHLO mail-wi0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750990AbbDGPeL (ORCPT ); Tue, 7 Apr 2015 11:34:11 -0400 Message-ID: <5523F8F0.7030405@plexistor.com> Date: Tue, 07 Apr 2015 18:34:08 +0300 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Christoph Hellwig CC: Dan Williams , linux-nvdimm , linux-fsdevel , "linux-kernel@vger.kernel.org" , X86 ML , Jens Axboe , Ingo Molnar Subject: Re: [Linux-nvdimm] [PATCH] pmem: Add prints at module load and unload References: <1427872339-6688-1-git-send-email-hch@lst.de> <551D60BE.1070101@plexistor.com> <551D6488.9090501@plexistor.com> <20150402164431.GB9774@lst.de> <5520F73E.3020602@plexistor.com> <20150407151915.GA18426@lst.de> In-Reply-To: <20150407151915.GA18426@lst.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 04/07/2015 06:19 PM, Christoph Hellwig wrote: > On Sun, Apr 05, 2015 at 11:50:06AM +0300, Boaz Harrosh wrote: >> [ +0.000537] pmem: init 2 devices => 0 >> >> So I have all the information. And I know the driver was actually loaded >> successfully on the expected two regions. > > The second number will always be 0, so no point in printing it. Why it can be any error that was collected in the load process its the error we are returning to the Kernel from pmem_init() Any none zero will mean module will not load and modprobe will return with an exit code. (Errors from probe() will be returned here) > Also device can be hotplugged at runtime, e.g. your magic PCIe device, > so iff you really want to print anything ->probe is the place for it. > Yes but for now it is only very much static. We could add it later when that happens, no? > But I still don't think we need it, once booted you can trivially look > up the information in sysfs. > Its not for the systems I can probe around in sysfs and or just ls /dev/pmem* It is postmortem when all I have is the logs and say a stack trace. For us in the lab it is very important, all we need is the single line on load/unload. But at probe time is fine as well, just more chatty as you were complaining. I will post two versions of this right away, I did it and forgot to post. Thanks Boaz