From patchwork Tue Aug 28 09:33:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bartosz Golaszewski X-Patchwork-Id: 10578085 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 651ED920 for ; Tue, 28 Aug 2018 09:34:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 55F8928869 for ; Tue, 28 Aug 2018 09:34:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 48C4428ABE; Tue, 28 Aug 2018 09:34:09 +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=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4700B28869 for ; Tue, 28 Aug 2018 09:34:08 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 371926B4569; Tue, 28 Aug 2018 05:34:07 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 31EA76B456A; Tue, 28 Aug 2018 05:34:07 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1E9BF6B456B; Tue, 28 Aug 2018 05:34:07 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-wm0-f69.google.com (mail-wm0-f69.google.com [74.125.82.69]) by kanga.kvack.org (Postfix) with ESMTP id B85F46B4569 for ; Tue, 28 Aug 2018 05:34:06 -0400 (EDT) Received: by mail-wm0-f69.google.com with SMTP id s205-v6so877353wmf.7 for ; Tue, 28 Aug 2018 02:34:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id; bh=ExI13v1fJqqBjr18SDJMb+h91Mx/RUyY7N4pHJEIe+U=; b=bR+2xdrjbJe7bMKveZG4+/lEteCn78yRRbtqVV6bL8bsKaS6v30KkqktdVtsgid+mF B/MZoh60EVMmcg24Ky/eSeFXqDqR0HqLiWt7ESqxLJZT7j33nGsQqgyke14c6JGi280V CTi7yD8wepfPdGISqXmNElSyGAHXg5/guiKNANgIRqdMcWrZ7uMte8O92ME6KZYTxGuo +vKV0MCHz/83Vsxaq9ZxR0rBWfrvYuB8Ovi32P5MDjAR7U5Kw8TXz8sUUpmx/i0VLJAz xMWowDJAkVYspYBm69fLDgJd+znG0tL+B5JD7ZRw+3surzHSXdXmI+teOYUEx1EA0SyA deVA== X-Gm-Message-State: APzg51A3zH9z/za4jjChmsxUiTetWrzuXMsUEnnkuArNuw6a1V/3pU+v qpYRZ8l+M7DuazM8uf5U4gn4VEUW6xK/4onocbO3s9ifvC17tVBvEBatk3aq52OW6ZaM806j32S mEhBDJGuVe3hjVErc0AZFU9hx6eoZFdYPRkQJbHwYMbwSON7DRcQxg922y6k4DNuUXI7Aq60vFR Qs8jTo5LsWvx/0DbvvxigE7dAWtedEYW2qWGkwhX4IbWkJ7X/YV9+B5wIQrCaTRyeCeW+2zEeFk dUBKmJZrwQ+B6fZxLFzJVExiX4wz1Q/VVI8xFlt9Qd1a8C0aP0iTGvh3JxlDzVT23Q0h52y5FrX veJkn/lKjZz9CP2IXElLbEajHPND4u0GctnMJZLi2aNwV3VpPuz9c0PO5ovSW+Dz3WK5Lak+heC y X-Received: by 2002:adf:c5c5:: with SMTP id v5-v6mr566286wrg.30.1535448846156; Tue, 28 Aug 2018 02:34:06 -0700 (PDT) X-Received: by 2002:adf:c5c5:: with SMTP id v5-v6mr566254wrg.30.1535448845387; Tue, 28 Aug 2018 02:34:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535448845; cv=none; d=google.com; s=arc-20160816; b=mEyYz4ut6oXXl/Bm5HVSKrzW0tizGFUfoNi7Hd0DDxXf9F9oQo051m5CqwHzR1Cwhb APt6kPrhba96ORMqF31NXA2yDle1tBL0BSPNkSAbDasZncBVX6ZHBkWQyuEqegGrhnP8 3xJbdtTCA7fyeugjk2gBfHoDlzCTmEkNFnb/A7dhNba8D9AaVP7xJr/SwHcc/ZasOX/n Ds3uD4FGaSRgO8jQutZUQ+i5AYSTTxKBxn/8UzdF3zBTYV6k5RP3iBHCDMaRZtmJFc1D Xl6T7zNyA+lvS2k4AWukHQIPzCAOuaK0nVARF9R5kSJXJAOhoe8EgLJZLS81at05D+ws ztVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=message-id:date:subject:cc:to:from:dkim-signature :arc-authentication-results; bh=ExI13v1fJqqBjr18SDJMb+h91Mx/RUyY7N4pHJEIe+U=; b=0W/YHN1ieiMX+fRJWVPbknjOhPOIwV1jm6GoM8ahnm0fP2gutmLaDndXcdzbbRlYF7 jvKdgCBsaA76/IRA2NC9Xo80N239r/OUJABIQfFN5kpLe+NLfIc4w33qixbN0vl8KlRS dqcFkaWoE0FOozZTTpxen+8rW8rMLHXkV5dOdTuuBxp9gbkXLWxF7LS7vg7KwQc6tq+J PfVIhd32glIhmNX9NETTxgWWh3/ytP06wDmNCXclO7OfTKSKlyuF/LGKEjMetAYT+8KI 2hGjoWROb+OlOzQGS5AfNTGQtB41B1FN8TqBumiU9U/EduLxxakk3tPyTDui0Mkl+ek2 7+4A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="aGS7c8/s"; spf=neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of brgl@bgdev.pl) smtp.mailfrom=brgl@bgdev.pl Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id b12-v6sor240046wrw.49.2018.08.28.02.34.05 for (Google Transport Security); Tue, 28 Aug 2018 02:34:05 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of brgl@bgdev.pl) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@bgdev-pl.20150623.gappssmtp.com header.s=20150623 header.b="aGS7c8/s"; spf=neutral (google.com: 209.85.220.65 is neither permitted nor denied by best guess record for domain of brgl@bgdev.pl) smtp.mailfrom=brgl@bgdev.pl 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=ExI13v1fJqqBjr18SDJMb+h91Mx/RUyY7N4pHJEIe+U=; b=aGS7c8/sWgPucAXuByklIY7H6PxlaOy5dXUXvzraR46pvE1SGdgY7map7lOePJqY8e H4YHI8zVpUPfcIWZgUNxnr9GOChT2mMujMCd9a6BxBHeUsIFJ3uvPFmKNcmQznXO5Dyd DT1lKtveROdAoyAlsA1Ctl7hE1hd1P4nmQ4CRJt8rPjHoSeR8Jly9bAUkPIwaF7E3J+f JiOm2xhpXseoEUY0P9qAksb1wzvLn2Gag/EzucnwLO3M/h4XWcWo+XDX4T8HDDOjjK7x QEILVxDygb9T925HKprjiFKpGLKps9rP2w4LXVtLTXeNuRYzsgdMDwzp85AaDkeBp5Ze pM3w== X-Google-Smtp-Source: ANB0VdYa5AF38DRseFlTuOWHQN7gTWlFUJ1y07mwmkWFARomcv5Lg5daORMRcRAwRjs0rUdd744RVQ== X-Received: by 2002:adf:9b9b:: with SMTP id d27-v6mr568289wrc.240.1535448844824; Tue, 28 Aug 2018 02:34:04 -0700 (PDT) Received: from brgl-bgdev.home ([2a01:cb1d:af:5b00:e837:b8d5:48c1:571b]) by smtp.gmail.com with ESMTPSA id l18-v6sm952276wru.75.2018.08.28.02.34.02 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 28 Aug 2018 02:34:04 -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 Cc: linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Bartosz Golaszewski Subject: [PATCH v2 0/4] devres: provide and use devm_kstrdup_const() Date: Tue, 28 Aug 2018 11:33:28 +0200 Message-Id: <20180828093332.20674-1-brgl@bgdev.pl> X-Mailer: git-send-email 2.18.0 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: 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 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(-)