From patchwork Fri Jul 28 13:17:26 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Simek X-Patchwork-Id: 9868777 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 6AC2060382 for ; Fri, 28 Jul 2017 13:18:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 531CB288D2 for ; Fri, 28 Jul 2017 13:18:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 462F9288DA; Fri, 28 Jul 2017 13:18:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id B9C1A288D2 for ; Fri, 28 Jul 2017 13:18:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=BQRrCYwVCebAQbrYpQA0+YQ2cUKHkXhaBFH5WNzz/78=; b=NQbbONgBLzqZHOVYzJfCnyKkLM SfgCNo0fx0D53hBCENIWI7q6VjJo+Pb7fpQCLkFQx4QIqLKC5AuNcWYvapSZ+WKhCs6pk4ocU82LT HtySKv6S7gcWJBJ/SmEX6VuhCb+DMImbOIanJv2lENZ2uKVUOXfyhJ/bnQRJHCTQLjj43p9tSahs+ OycR4OJl0z/uKq2iHyCI0cm55ZJ/2OeoP8K25ppRvA4lVMmI8X7bMKw3MxD3slq8iJVRl3Akg6yjc vkKCZ3Qmh6+HxVQZmBsvtY8CUWrczNU+mKl1hoH7cWOAG6/qs56JjX8B6vgE2WF7KCD7lecNGzmcN e6sJlVuw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1db59a-0003p0-3P; Fri, 28 Jul 2017 13:18:06 +0000 Received: from mail-wm0-x241.google.com ([2a00:1450:400c:c09::241]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1db59P-0003W5-5O for linux-arm-kernel@lists.infradead.org; Fri, 28 Jul 2017 13:18:03 +0000 Received: by mail-wm0-x241.google.com with SMTP id 184so27402091wmo.3 for ; Fri, 28 Jul 2017 06:17:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monstr-eu.20150623.gappssmtp.com; s=20150623; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=/xvhEd8C9tmns16vVL8bCkwWZZCZ5A8mLjpgW8/9T4k=; b=CdrThaOriOBwDSfsiRPHnu3NhPeydlSXvLxLFkChVeHjZrH49W05/as2yXaAIbqoZC VAzXt19CKszOXuYoSqARR2GQsMQFgkS11vxHswtB288/xETzIXbmFt+5/LR24kHZOrrS +mtElDKsqSVnR+gGQgeiu0pkzvLe2JS0rbSzlnuq51HiM0OCN6BDWMQmmcLcmR9ERulU J385uX5wHHKGOIU5uvlwAF8r4sz+LXDgv7FWnpthvsSiqlYY4hN4fneq5w7gGVjciVRL 8ZgBgVaYFS0j9QdF0dmQmIPWCcJVNS/hHf1+xTzAUNapojWlf6NLDpkSiW8gQB3c8wtr J7aQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:in-reply-to:references; bh=/xvhEd8C9tmns16vVL8bCkwWZZCZ5A8mLjpgW8/9T4k=; b=PuLrgJdRfcGQjrMOqtSm1g8RpDIR+sKPUIy5mS6tL/rfJFzKp2YaFJGpQKrjZW/3QZ oChIcfBKXzR+yIJdVrXJhjRiRssAc/8QQDqTdaVmXqD5/sGXlfFf3lY7AvEF4ga3U+9F hc17KylWV949YRn9cGLI2fbrYqnQS+NKP0q/vWHsrI7n/2JsYoyoPVycOqBnKxpzNxok mNBGhGgl9Ccxb/DGR3YYUnI0I5vh2GT5UrflYsDoun8g4WoJAWTPvVBnnL2Rpc/rMUVh 5aQj+wpTh/BYyFu8OFtBGe8d75ZJxCxwyN20o1TyHHf3NtKTwol31KkRSNqvHYrFDNSi +XIA== X-Gm-Message-State: AIVw110nL2vlPgzaqLrc0qoc6eE9f9z3Jw+wTbwnOnyP93WyHHZrDKSN ir0+q/7j5zisKHcM X-Received: by 10.28.142.74 with SMTP id q71mr1267079wmd.25.1501247853085; Fri, 28 Jul 2017 06:17:33 -0700 (PDT) Received: from localhost (nat-35.starnet.cz. [178.255.168.35]) by smtp.gmail.com with ESMTPSA id p135sm8899276wmg.12.2017.07.28.06.17.32 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Fri, 28 Jul 2017 06:17:32 -0700 (PDT) From: Michal Simek To: linux-kernel@vger.kernel.org, monstr@monstr.eu Subject: [PATCH 2/2] char: xilinx_hwicap: Fix warnings in the driver Date: Fri, 28 Jul 2017 15:17:26 +0200 Message-Id: <79e2e616a8b7dbf38eb72ba0b620230017dcbc65.1501247838.git.michal.simek@xilinx.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <6da0afe2afd2c7a21d16da9a9c7acab09385ae2c.1501247838.git.michal.simek@xilinx.com> References: <6da0afe2afd2c7a21d16da9a9c7acab09385ae2c.1501247838.git.michal.simek@xilinx.com> In-Reply-To: <6da0afe2afd2c7a21d16da9a9c7acab09385ae2c.1501247838.git.michal.simek@xilinx.com> References: <6da0afe2afd2c7a21d16da9a9c7acab09385ae2c.1501247838.git.michal.simek@xilinx.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170728_061755_640854_06D06BB0 X-CRM114-Status: GOOD ( 18.56 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Arnd Bergmann , Nava kishore Manne , Rob Herring , linux-arm-kernel@lists.infradead.org, Greg Kroah-Hartman , =?UTF-8?q?S=C3=B6ren=20Brinkmann?= MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Nava kishore Manne This patch fixes the below warning --> Use #include instead of --> Use #include instead of --> please, no space before tabs --> Block comments use a trailing */ on a separate line --> Possible unnecessary 'out of memory' message --> Block comments use * on subsequent lines --> Block comments use a trailing */ on a separate line --> braces {} are not necessary for any arm of this statement --> DT compatible string "xlnx,opb-hwicap-1.00.b" appears un-documented --> DT compatible string "xlnx,xps-hwicap-1.00.a" appears un-documented Signed-off-by: Nava kishore Manne Signed-off-by: Michal Simek Acked-by: Rob Herring --- Documentation/devicetree/bindings/xilinx.txt | 2 ++ drivers/char/xilinx_hwicap/xilinx_hwicap.c | 35 ++++++++++++++-------------- drivers/char/xilinx_hwicap/xilinx_hwicap.h | 6 +++-- 3 files changed, 23 insertions(+), 20 deletions(-) diff --git a/Documentation/devicetree/bindings/xilinx.txt b/Documentation/devicetree/bindings/xilinx.txt index 299d0923537b..1d11b9002ef8 100644 --- a/Documentation/devicetree/bindings/xilinx.txt +++ b/Documentation/devicetree/bindings/xilinx.txt @@ -281,6 +281,8 @@ capabilities of the underlying ICAP hardware differ between different families. May be 'virtex2p', 'virtex4', or 'virtex5'. + - compatible : should contain "xlnx,xps-hwicap-1.00.a" or + "xlnx,opb-hwicap-1.00.b". vi) Xilinx Uart 16550 diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.c b/drivers/char/xilinx_hwicap/xilinx_hwicap.c index 5e5c8ee23a5b..067396bedf22 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.c +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.c @@ -86,8 +86,7 @@ #include #include #include - -#include +#include #include #ifdef CONFIG_OF @@ -253,8 +252,8 @@ static int hwicap_command_desync(struct hwicap_drvdata *drvdata) * hwicap_get_configuration_register - Query a configuration register. * @drvdata: a pointer to the drvdata. * @reg: a constant which represents the configuration - * register value to be returned. - * Examples: XHI_IDCODE, XHI_FLR. + * register value to be returned. + * Examples: XHI_IDCODE, XHI_FLR. * @reg_data: returns the value of the register. * * Returns: '0' on success and failure value on error @@ -324,7 +323,8 @@ static int hwicap_initialize_hwicap(struct hwicap_drvdata *drvdata) dev_dbg(drvdata->dev, "initializing\n"); /* Abort any current transaction, to make sure we have the - * ICAP in a good state. */ + * ICAP in a good state. + */ dev_dbg(drvdata->dev, "Reset...\n"); drvdata->config->reset(drvdata); @@ -636,7 +636,6 @@ static int hwicap_setup(struct device *dev, int id, drvdata = kzalloc(sizeof(struct hwicap_drvdata), GFP_KERNEL); if (!drvdata) { - dev_err(dev, "Couldn't allocate device private record\n"); retval = -ENOMEM; goto failed0; } @@ -763,20 +762,20 @@ static int hwicap_of_probe(struct platform_device *op, id = of_get_property(op->dev.of_node, "port-number", NULL); /* It's most likely that we're using V4, if the family is not - specified */ + * specified + */ regs = &v4_config_registers; family = of_get_property(op->dev.of_node, "xlnx,family", NULL); if (family) { - if (!strcmp(family, "virtex2p")) { + if (!strcmp(family, "virtex2p")) regs = &v2_config_registers; - } else if (!strcmp(family, "virtex4")) { + else if (!strcmp(family, "virtex4")) regs = &v4_config_registers; - } else if (!strcmp(family, "virtex5")) { + else if (!strcmp(family, "virtex5")) regs = &v5_config_registers; - } else if (!strcmp(family, "virtex6")) { + else if (!strcmp(family, "virtex6")) regs = &v6_config_registers; - } } return hwicap_setup(&op->dev, id ? *id : -1, &res, config, regs); @@ -806,20 +805,20 @@ static int hwicap_drv_probe(struct platform_device *pdev) return -ENODEV; /* It's most likely that we're using V4, if the family is not - specified */ + * specified + */ regs = &v4_config_registers; family = pdev->dev.platform_data; if (family) { - if (!strcmp(family, "virtex2p")) { + if (!strcmp(family, "virtex2p")) regs = &v2_config_registers; - } else if (!strcmp(family, "virtex4")) { + else if (!strcmp(family, "virtex4")) regs = &v4_config_registers; - } else if (!strcmp(family, "virtex5")) { + else if (!strcmp(family, "virtex5")) regs = &v5_config_registers; - } else if (!strcmp(family, "virtex6")) { + else if (!strcmp(family, "virtex6")) regs = &v6_config_registers; - } } return hwicap_setup(&pdev->dev, pdev->id, res, diff --git a/drivers/char/xilinx_hwicap/xilinx_hwicap.h b/drivers/char/xilinx_hwicap/xilinx_hwicap.h index 1f687a71e36e..6b963d1c8ba3 100644 --- a/drivers/char/xilinx_hwicap/xilinx_hwicap.h +++ b/drivers/char/xilinx_hwicap/xilinx_hwicap.h @@ -62,11 +62,13 @@ struct hwicap_drvdata { struct hwicap_driver_config { /* Read configuration data given by size into the data buffer. - Return 0 if successful. */ + * Return 0 if successful. + */ int (*get_configuration)(struct hwicap_drvdata *drvdata, u32 *data, u32 size); /* Write configuration data given by size from the data buffer. - Return 0 if successful. */ + * Return 0 if successful. + */ int (*set_configuration)(struct hwicap_drvdata *drvdata, u32 *data, u32 size); /* Get the status register, bit pattern given by: