From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-10.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72FAAC433E0 for ; Thu, 25 Jun 2020 11:24:08 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3FF8320706 for ; Thu, 25 Jun 2020 11:24:08 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="asB92nDN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="hLL/40x9" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3FF8320706 Authentication-Results: mail.kernel.org; dmarc=fail (p=quarantine dis=none) header.from=microchip.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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:In-Reply-To:References:List-Owner; bh=rgPGYJe+cOZ5soko59lRU5Q4igbPszKx8Qz1ZWoCWuI=; b=asB92nDNrf8xOLF7eAbREyptXT IW3hgoPXvRu+gg3Kr9pFEnVh4i2ziyn8nEad1dixqyaUnQAlohA6CuWxomx59dRiL57up4QTbY1Sr 1qjZ9EoDFnBDwRSR6Kuqa5ndgzkdBxcAcqRSQ9u6zdM4eBoM20+9421Sp6ptyMn1OfcGa8qfdKxzI /+3Oc9ZHYxTBN+Bko3KEujJqNjtn/9AR6buXu2VHjeEKr8Mgqv8xzoywvKL+p6+l2OUtlrXoR381W MNOwPtR6duhtkVX7PGpoA8MLuI2djMRSa2rTrt5gwKvoKuFoHoO2GwwZeEOzEmkhOdES968aP7Olt UTizvUMA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1joOpD-0002ay-3o; Thu, 25 Jun 2020 10:09:43 +0000 Received: from esa5.microchip.iphmx.com ([216.71.150.166]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1joOpA-0002a5-IZ for linux-arm-kernel@lists.infradead.org; Thu, 25 Jun 2020 10:09:41 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1593079781; x=1624615781; h=from:to:cc:subject:date:message-id:mime-version; bh=rnxg/SfWJqBp11CmjXPigJYLMp2gIu1Y+fOu8gptcnA=; b=hLL/40x9SxLA7zuIoWmFiX36tDtHK6bmSWwbVu06R7uwuWDPUcEa597L 9pCLzd3htYi9ubjQRQIAdc8xhEAlRjN4mnqcGWCtSr5zdouL/pcVCafVH Sguiaqxht29NCcqUd7by5LBxoRwYeft/u9Kx5Xe1SirtH7WXWs0JIdOY8 B6XUvhpKxLRvHiF5azPm+QHM7QeruLNG0dqcvaXeFkTCQOHFH4q1td22f X790cS8c+JuSgqA3RZA0qdRLcWm4tGCSGn2R/4kcFFYwWN1qhCNlDqdc7 xaXxJqNhW5nZ09f8qptD9KQeuApOrtzOr8v12WdX8ngMSqIExq/WqhC0n Q==; IronPort-SDR: Nzc1KkoJRY2CYTb7HYfy6DHqtKQf3yvwU5AdJGRKj4WgEQeWQhTitPDXomGb9guBgdJTqnvr4b ZNEnTrPBQQWpIE9xTELjrHldR5TWGNVegVJ40KyoJ+k7GnxWu/IhZIVtBZ/OuhZlb0W7cnnQg4 xsO5KL99AZ+vR36hCjMTx/Ru2odtDKOpvF/ztkNEi9iKOL0NVeyc9odg0T2v6mwWz5oF4n3caF 5o79zhj3oj7PCx9GQqUiNiOcrrBWqITz8U/FCGRBnCWlmtTqKoKyEG2U6K+wAcWFlfovzQtFcJ WXE= X-IronPort-AV: E=Sophos;i="5.75,278,1589266800"; d="scan'208";a="80856699" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa5.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Jun 2020 03:09:37 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Thu, 25 Jun 2020 03:09:23 -0700 Received: from m18063-ThinkPad-T460p.microchip.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.1979.3 via Frontend Transport; Thu, 25 Jun 2020 03:09:31 -0700 From: Claudiu Beznea To: , , , , , Subject: [PATCH 1/2] clk: at91: remove the checking of parent_name Date: Thu, 25 Jun 2020 13:09:27 +0300 Message-ID: <1593079768-9349-1-git-send-email-claudiu.beznea@microchip.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Claudiu Beznea , mturquette@linaro.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, bbrezillon@kernel.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is no need to check parent_name variable while assigning it to init.parent_names. parent_name variable is already checked at the beginning of at91_clk_register_sam9x5_peripheral() function. Same thing with init.num_parents: it could only be 1. Fixes: 6114067e437eb ("clk: at91: add PMC peripheral clocks") Signed-off-by: Claudiu Beznea --- drivers/clk/at91/clk-peripheral.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/clk/at91/clk-peripheral.c b/drivers/clk/at91/clk-peripheral.c index c2ab4860a2bf..4a0f40738fe3 100644 --- a/drivers/clk/at91/clk-peripheral.c +++ b/drivers/clk/at91/clk-peripheral.c @@ -111,8 +111,8 @@ at91_clk_register_peripheral(struct regmap *regmap, const char *name, init.name = name; init.ops = &peripheral_ops; - init.parent_names = (parent_name ? &parent_name : NULL); - init.num_parents = (parent_name ? 1 : 0); + init.parent_names = &parent_name; + init.num_parents = 1; init.flags = 0; periph->id = id; @@ -340,8 +340,8 @@ at91_clk_register_sam9x5_peripheral(struct regmap *regmap, spinlock_t *lock, init.name = name; init.ops = &sam9x5_peripheral_ops; - init.parent_names = (parent_name ? &parent_name : NULL); - init.num_parents = (parent_name ? 1 : 0); + init.parent_names = &parent_name; + init.num_parents = 1; init.flags = 0; periph->id = id; -- 2.7.4 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel