From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757344AbbJVMK2 (ORCPT ); Thu, 22 Oct 2015 08:10:28 -0400 Received: from mout.kundenserver.de ([212.227.126.131]:52304 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757251AbbJVMKY (ORCPT ); Thu, 22 Oct 2015 08:10:24 -0400 From: Arnd Bergmann To: Eric Auger Cc: eric.auger@st.com, alex.williamson@redhat.com, b.reynal@virtualopensystems.com, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org, christoffer.dall@linaro.org, linux-kernel@vger.kernel.org, patches@linaro.org Subject: Re: [PATCH v2 3/6] vfio: platform: reset: calxedaxgmac: add reset function registration Date: Thu, 22 Oct 2015 14:09:49 +0200 Message-ID: <43557523.izmYB5ybOS@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: <5628CE82.7090105@linaro.org> References: <1445506922-6005-1-git-send-email-eric.auger@linaro.org> <4810974.apRDTjc3oB@wuerfel> <5628CE82.7090105@linaro.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:NdeF0N4RFJlYKC4zG6WA0b31ENFqKfdtP42sRF/YolnSB1U3DhJ NhpDGj06dLhcpy1jsaXqnozbK06FrSP35Zfi1XSWGFLd1epO0LxnbYTmcbKo3lEFXlwYwac 0DL/A7L5tPwdIL/5g3wBvCw7kcubz10T7wGKPSK9sgCch+G/sOqi5bjTAtmVcRjHMw32IB4 YOHenB95QiXs86/8ATl4Q== X-UI-Out-Filterresults: notjunk:1;V01:K0:JlwfXDBLkX4=:iSC9UWjdE29uN7hvdCh+O8 xXCfpW9umMNULAmb9wNSKCniaelnyUc3/jdVeXDikwR1N584zXMaek8RdvKt8zZYsvURDaab3 QHrpxnllooulTcqBCJyy3Ec4D9mY7pPR5PttcnY/ZVMXLBdb6tjM06sEkAIa3nNpip56raQPC qQSFWAMkuw80sceGgaMVCBy1LxY5V0G+0KyuGGMUrMC8b0qieTdx4DuEjwxYeYf6NyVJCve8B O2jsY1gMafDp6aUKRl117kV9qMlTu3flSlBfU16KzpMpuo+yDSx0RqIDVYEaumzNNvyDIDpWl PEb0rU08JKMEd0YkQI2/1iBTeROVSJv0Fjj5uZst4pCvCo2DDGS4f0+dHHA810fhVFgZ6Ty+8 7O6LYdf+EzQA+Q+r5feb0CS3vRQQdrBezvB4v0p35m7l2oydbqlbzbV/Ov42+xgW/5qcVpQD4 tO3c5WSJM4pswr98Sy4ykakHSH7aYylMpB4CLFaEwCNB/z85KYuw6Lgc53KQa8HNKzXugUfPs Z/AZFs6Xx/WuS9W2Ke3flUkZhI510OsefyytzDASThM/R69bc+IEmJ1l3KXcHx9MTdrMQqWA6 zhebrqZ28ZrDfiE5y8sUpqKgKVjqsN0ZhnqdLl8T48YhARU7fl9VfieOKqrvGXbdIGMlzqkDv nx1F3w0R9PpMKfswPeTuTv+wex//cHxRwbQ4t7RaPy2bEejZ7O8mSRHfh4V0yWtjmzJeY0st8 rDRJOZDNe6kF3k5I Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thursday 22 October 2015 13:54:42 Eric Auger wrote: > On 10/22/2015 12:13 PM, Arnd Bergmann wrote: > > On Thursday 22 October 2015 11:41:59 Eric Auger wrote: > >> This patch adds the reset function registration/unregistration. > >> > >> Signed-off-by: Eric Auger > > > > Looks good, except one thing: > >> @@ -70,6 +69,8 @@ int vfio_platform_calxedaxgmac_reset(struct vfio_platform_device *vdev) > >> return -ENOMEM; > >> } > >> > >> + pr_info("VFIO reset of %s\n", vdev->name); > >> + > >> /* disable IRQ */ > >> writel(0, reg.ioaddr + XGMAC_DMA_INTR_ENA); > >> > > > > This probably slipped in from debugging, please remove it. > Well actually this is not an oversight but some unappropriate tracing > attempt I am afraid. I wanted to add a trace useful for the end-user to > make sure the VFIO reset function was called. Do you forbid that or do > recommend to use another tracing mechanism/level? In the past I tried > dynamic tracing but with module loading mechanism I found it not that handy. If you think it's useful to have in the long run, it should be a separate patch with a description what it's good for, rather than a side-effect of an unrelated patch. It just looked to me like it's something you do while debugging the reset code, rather than while using it. Implementation-wise, you should use dev_info() instead of pr_info() where possible, and it probably makes sense to put this into the vfio_platform driver before calling the reset function, for consistency between the drivers. Arnd