From patchwork Sun Nov 13 18:09:44 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 2487 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 48B3640F5A for ; Sun, 13 Nov 2022 19:09:51 +0100 (CET) Received: by mail-ed1-f71.google.com with SMTP id z9-20020a05640235c900b0046358415c4fsf6754392edc.9 for ; Sun, 13 Nov 2022 10:09:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1668362991; cv=pass; d=google.com; s=arc-20160816; b=Rf/ggvJZA6tRfuwy7CwXwnTy3ondPuhW0nP92JqJlnV6hrCN+vcg2lSU5YW61o9rNa k1jlHJt09I/ETQyMiTflPdQ/rtc39tadgKl2bbsmGmvcssp+abXhvf4tyDyXALtAe2pQ JDmMkbwdJlYm+Wnhg/oLKkEM8ruZiUK78AC1MPvMDEkBHUMSa72pTEN7A40HVl3WWDqH TgcC9LBY6e5beSgpcOeNbeUhOSQDrIgnGxRSr3zZ8awgz5+e11o+00JYSLDi/C73B2BT Sca90GKH2+A8R7oE9TEisFiDqP+SiGEz49bEb4/vzVCzDKs3R4j+MHDIvlOF06nDo31M /WKg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:message-id:date:subject:cc:to :from:dkim-signature; bh=EjmHz+Uhl4JqmnqH1m1IisytLlR1BtumjJFoR5VNffI=; b=vRCl76JNUwmJ2YHTYQ3m6QYca7XyFdeB7lNHps7kskooq3n5UrqK2A7Em2B/Ex3Wlh BgJCL/2viKIMWb7y6EOgvnNuBv2pvvVBnpIK7kDwbq2aiHLJystt3tIpeu58r/Su9H3P 3CSQcLS3uyoHdkE4iujza1FK94chUOHwalcfOTl4mgL479RwsFs1cHkvwEPvAa3HYrua 8INdKk9G3oYXovxb3XM2hl1DYPSN+wVk027srCxc4FoX77g7NXwTVsQHgAe/3TrApDa5 bbPciUWsPtA7KrVd2xT1vmrTgAlDN1GUwB40nBwfPGAog9PpPXcUOu9BSvbBzwwKBWNt BKrA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Klr8ditt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:message-id:date:subject:cc:to:from :from:to:cc:subject:date:message-id:reply-to; bh=EjmHz+Uhl4JqmnqH1m1IisytLlR1BtumjJFoR5VNffI=; b=UJ2xkhGliJZlhrqKOSrLbfcOUtzUQp2F1wAJ8X9hfo8DLJRHFzoFcf0Dv5elk7hwy8 Jc/isGSIEOUg6rU3720Kn6DRHsjFGpvefP48QWbvt98Zp9tPxdHhOrS0NOiHlC5rx1oH VCzJd9cQjKUpHjGwB7gjPG1+RREQhJ08OtZGE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EjmHz+Uhl4JqmnqH1m1IisytLlR1BtumjJFoR5VNffI=; b=YsP3nBnk7br04iGve/syjzjIyiMgSzKBp6Bo3mBZUj6W/Q4OiiTTJRGDDahUrOntoW zAZ8PUJDlGoHZuNdIN3hT+bGI5LCDAPiG4hHwrkzV0pg/e4m2Oog2YLCnpbQ8Ubqp3eD WmB72ad3ic+DDhi13WB6nx/h20idBxDZSOnt4tE0LITcxBHnyfXiofMKgiruL2/th4eV uLiCpXLP3kSPcm6BedrHPYtf6+2KG1ksz0WWjp+CzQUcQV8eKiJDUVjqYGt0Pt4EWZVn sLo+ItM4UcqIYu489zB5huCUztmH7+cSycJ8NHvjjqhB0L8WE15Ezd6V8q+yUAf+L0Ex JOng== X-Gm-Message-State: ANoB5pldeT0F7a/oWytoVy26U3oytFGZKxfbvNmR3hUrGFWJ+2/bU2XH rFN9v4qdnVf7JUADhxZjjXPixo/1 X-Google-Smtp-Source: AA0mqf6lAgeAGEI/XIV9Jrc1mNgFdtDXxDQsGjXEDbBjCPi6xUbej3n+vTzDy4M1Lpn78xLRhbPhPQ== X-Received: by 2002:a50:ef10:0:b0:461:ecca:e8a with SMTP id m16-20020a50ef10000000b00461ecca0e8amr8786613eds.139.1668362991127; Sun, 13 Nov 2022 10:09:51 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a17:906:ca58:b0:7a7:f2a:d325 with SMTP id jx24-20020a170906ca5800b007a70f2ad325ls4990540ejb.10.-pod-prod-gmail; Sun, 13 Nov 2022 10:09:50 -0800 (PST) X-Received: by 2002:a17:907:cca7:b0:7ae:3b9e:1d8a with SMTP id up39-20020a170907cca700b007ae3b9e1d8amr7714050ejc.581.1668362989971; Sun, 13 Nov 2022 10:09:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668362989; cv=none; d=google.com; s=arc-20160816; b=DrUkB4fcecAJz/LJKjbeRpH7NxikHm+alDDEp8oegzhZNXUsbNHQoENCFZoiO6gRs0 h8AB0ekYlhsTpR+hDSMwW299CYIjD7kr3+20IPgVCFcIGKb5Jjm7QwDFezHlMeE7yKWh JiUXiliBb8hhLbv3VRnnDHCt8WAdxuix/DlCdAhEBK88LBjENgvCPxVkaFxonRV3zvt4 sBSGwAAumpfEPmsrIbbvkQ8ZcSCEEA99cbJ8sjbWXhJ6dzeLqCB8hOnsoIVdO9RJt3Gh PiiusOTt7quIu+1ieHRO2J7PufFFNA2Hexv3jVtq0502r/ZTZF2dgdgBotZioBKzU0Nd 2tpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=4byRwPo02lvkmaR0NL7PCXZ/wh86nqqJqs0NF0iJNN4=; b=qRUarKlQtmoEfr/HE8doMbPmbepBgDNQUWEYcvXaeBX7kSPa/cAAilHGf8HUeBFzgD eripxA5vmsZZrZE+BOFLaPUcY1qu2y39zRh7E8Bl9TxMHkDw9m8n6j2eLi9llIacv+El tDPLiVSLYmxv0hvJEeUBhUaiuwRvOJNqytkmYXlUZAROUlT0AcO7b3yngE4PgUbhYYGj is4A6CNfBeu30VCC3H3b6dEJllF15ow0/EUaBLtiH6TYuD0RX3s9EwYM7F0yKrd2Uxwo wva0fFmBqfdVbkot4MvYBZebHMy9FWz9DdtEEfdV6E20qrgQSFJ5xqMcWFX1sVfGvQrx ukyw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Klr8ditt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id v19-20020a509553000000b00461b2532c61sor3750441eda.26.2022.11.13.10.09.49 for (Google Transport Security); Sun, 13 Nov 2022 10:09:49 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Received: by 2002:a05:6402:381b:b0:456:d9f9:8f3a with SMTP id es27-20020a056402381b00b00456d9f98f3amr8801725edb.258.1668362989724; Sun, 13 Nov 2022 10:09:49 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-79-40-103-33.business.telecomitalia.it. [79.40.103.33]) by smtp.gmail.com with ESMTPSA id n23-20020a170906701700b0078db18d7972sm3197502ejj.117.2022.11.13.10.09.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 13 Nov 2022 10:09:49 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, Amarula patchwork , Dario Binacchi , Abel Vesa , Fabio Estevam , Michael Turquette , NXP Linux Team , Pengutronix Kernel Team , Sascha Hauer , Shawn Guo , Stephen Boyd , linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH] clk: imx: DRY cleanup of imx_obtain_fixed_clock_hw() Date: Sun, 13 Nov 2022 19:09:44 +0100 Message-Id: <20221113180945.1626061-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Klr8ditt; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The imx_obtain_fixed_clock() and imx_obtain_fixed_clock_hw() functions behave pretty similarly, DRY and call one from another. No functional changes intended. Signed-off-by: Dario Binacchi --- drivers/clk/imx/clk.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/drivers/clk/imx/clk.c b/drivers/clk/imx/clk.c index 5582f18dd632..573b1a6ca1dc 100644 --- a/drivers/clk/imx/clk.c +++ b/drivers/clk/imx/clk.c @@ -104,9 +104,7 @@ struct clk_hw *imx_obtain_fixed_clock_hw( { struct clk *clk; - clk = imx_obtain_fixed_clock_from_dt(name); - if (IS_ERR(clk)) - clk = imx_clk_fixed(name, rate); + clk = imx_obtain_fixed_clock(name, rate); return __clk_get_hw(clk); }