From patchwork Mon Sep 24 10:11:46 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10612155 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E450B13A4 for ; Mon, 24 Sep 2018 10:12:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CFD9A29ED2 for ; Mon, 24 Sep 2018 10:12:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BE7AA29EE2; Mon, 24 Sep 2018 10:12:05 +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=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1743629ED2 for ; Mon, 24 Sep 2018 10:12:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728078AbeIXQNX (ORCPT ); Mon, 24 Sep 2018 12:13:23 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:40359 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727469AbeIXQNX (ORCPT ); Mon, 24 Sep 2018 12:13:23 -0400 Received: by mail-wm1-f65.google.com with SMTP id o2-v6so2822436wmh.5 for ; Mon, 24 Sep 2018 03:12:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bgdev-pl.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id; bh=imbjK81jVRpEHkR4I0gKczalGuY2afrY9ylxpTqoEdU=; b=bquvQUQKF23S/krIlBtPBfSlm4C5X4X74objq3j8i5yfNZUeE2CQv0sE2IIBIrY6TC b6Bp4MyssApejL0e+XFuVMLyYzz+AIBbk949QfIW95JixLqhLtDjFKgfIDQXlf4IFVwB fmVQKRTClquTOg8ms5HaP43OSDhFifMG328kfAB5/PjZGTNCiQn3+F/vWiJkqIBVUSuY Uc6B/fSpWiCZ8hq50FzshYxVA3Ddia3H98ZoCIASubyP8x/3yL8LTy8ckzgqEiTytm73 DudsnN6Pd4ESStRlgCftCpORiXzQz50OpdkJFDReH9B4Kd6Ckl0x3m6lC31BZhcCE0jX OAVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=imbjK81jVRpEHkR4I0gKczalGuY2afrY9ylxpTqoEdU=; b=CZrnC76J6blaTzX7dOwNm406xI4U3EB9mEupCarkhSQAaw1rQB6VmrNo3KHYlFeR6s /eIXkX7XGNXAeKzg/aN4nDS+9tMSqjYO9ysX0TwbacbOpui3+ykhxesNL02tIA9s1YTf BbfW4Lfu7BZhFY4jaa6CZMrAN/sJokYMOiTzBL+C8FXpVxVzxp8d3DGNpofXT2yP0J1f AwmhSjjWWVlNutBQkau/Oa8pX525GkFmdVyPKWRbj+i8PKHsFsBg/w6UtMFS+sIiyCm3 wpn2qaDTFcwF/QLMl9IDbniCx+pyzlv9cr9b37ZsiETcLIUrYc1a38VFJhN5LPjYL38o FL9A== X-Gm-Message-State: APzg51Dvtn0Kq8rkemM4rcvmeldURzPfVZNEkXqNliVuFfKGAR2smzD9 KG3YiEBVS6hj3tvPwDlE3cn6jQ== X-Google-Smtp-Source: ACcGV60uNz03eCyjgHIy1QlDYkKGTtTRXyIFjDSlgMLWjEnd2XOXq7chhBkDMGylsoO8SrtVQFzpIQ== X-Received: by 2002:a1c:d141:: with SMTP id i62-v6mr6188892wmg.113.1537783922357; Mon, 24 Sep 2018 03:12:02 -0700 (PDT) Received: from brgl-bgdev.baylibre.local (AStLambert-681-1-2-33.w90-86.abo.wanadoo.fr. [90.86.1.33]) by smtp.gmail.com with ESMTPSA id o12-v6sm3291728wrj.58.2018.09.24.03.12.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Sep 2018 03:12:01 -0700 (PDT) From: Bartosz Golaszewski To: Michael Turquette , Stephen Boyd , Greg Kroah-Hartman , "Rafael J . Wysocki" , Arend van Spriel , Ulf Hansson , Bjorn Helgaas , Vivek Gautam , Robin Murphy , Joe Perches , Heikki Krogerus , Andrew Morton , Mike Rapoport , Michal Hocko , Al Viro , Jonathan Corbet , Roman Gushchin , Huang Ying , Kees Cook , Bjorn Andersson , Arnd Bergmann , Andy Shevchenko Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Bartosz Golaszewski Subject: [PATCH v3 0/4] devres: provide and use devm_kstrdup_const() Date: Mon, 24 Sep 2018 12:11:46 +0200 Message-Id: <20180924101150.23349-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This series implements devm_kstrdup_const() together with some prerequisite changes and uses it in pmc-atom driver. v1 -> v2: - fixed the changelog in the patch implementing devm_kstrdup_const() - fixed the kernel doc - moved is_kernel_rodata() to asm-generic/sections.h - fixed constness v2 -> v3: - rebased on top of 4.19-rc5 as there were some conflicts in the pmc-atom driver - collected Reviewed-by tags Bartosz Golaszewski (4): devres: constify p in devm_kfree() mm: move is_kernel_rodata() to asm-generic/sections.h devres: provide devm_kstrdup_const() clk: pmc-atom: use devm_kstrdup_const() drivers/base/devres.c | 43 ++++++++++++++++++++++++++++++++-- drivers/clk/x86/clk-pmc-atom.c | 19 ++++----------- include/asm-generic/sections.h | 14 +++++++++++ include/linux/device.h | 5 +++- mm/util.c | 7 ------ 5 files changed, 63 insertions(+), 25 deletions(-)