Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp378572imm; Fri, 1 Jun 2018 02:30:39 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKFRHnPD5Rld0WIedbruenlkWTe1cNSGAp8S9Ih9nd4RuWswdZDOaPfDSeAR2rABKRxV5Rk X-Received: by 2002:a17:902:bd4c:: with SMTP id b12-v6mr10679440plx.242.1527845439290; Fri, 01 Jun 2018 02:30:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527845439; cv=none; d=google.com; s=arc-20160816; b=EIJE1ywMdLQRHZueoaXpDFfok+XRoMx5H2amUNTL0EYTKqe/Lz7uAIX400XIfa9+0s EE5KB1/uHrVT2dXzPr8XW3JYjs33ybV500vF3+AM1xDVzbBxHJfa74Ieee2bD81ypl7L SaRMYqPRZpu/7y1S4W8OGBrSUJDWF7nXN6dS9Kl1zVMImAJG9r9ixVG0y4SuxL0U7zKq i8PwdgXUhBi8l/hfMHPaCgZHKvxJX2HFEG5mT//8iiDXqocXdZi1wyyc6Ldz0L9ECA1f 9ib24ePL+TJUyoq/1gKmg2rYjoRXo7+HAoxmsAed1raUivosBTN0h6LPdA5+MkRcUySa zwkA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=kgZ4HMLTpBT9DfotAh6tg6AY/A3E+mfLAP+63th8WY0=; b=UC7xAB1DPVzBg6JS8guBheKIKiluGQ35ErSPLEUovzhGEI7t95+bqhtDQu1v+g++MJ DcdyBBK12P+sIk1o9QFGl3jum+xadEmp2KrEPMG++RevjsuhUbtNnFrFnm3sgROashTj bSPVFmgGOoTtsG9qdg3i4elILIJ/z1AkyzNB0sDR0zDhDV9xW4R0E4vJJhXd/eW7gmsK H69lqn9JfVuDn3D8UY0qSsLOnlC+CvOm/em9jjnRE91EL3oFMixxRqjDwC+/oPCVs1vh glN4TxKv818WYGSXzpeOZLL2mzLtgiSHNaB+d7g5LDLFxnOKtai4+ZcXHi24ZJwktGuv KzxQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x6-v6si13595340pll.24.2018.06.01.02.30.25; Fri, 01 Jun 2018 02:30:39 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751684AbeFAJ3J (ORCPT + 99 others); Fri, 1 Jun 2018 05:29:09 -0400 Received: from michel.telenet-ops.be ([195.130.137.88]:60292 "EHLO michel.telenet-ops.be" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750795AbeFAJ3H (ORCPT ); Fri, 1 Jun 2018 05:29:07 -0400 Received: from ayla.of.borg ([84.194.111.163]) by michel.telenet-ops.be with bizsmtp id tMUt1x00o3XaVaC06MUtkS; Fri, 01 Jun 2018 11:29:05 +0200 Received: from ramsan.of.borg ([192.168.97.29] helo=ramsan) by ayla.of.borg with esmtp (Exim 4.86_2) (envelope-from ) id 1fOgMf-0007Zq-JI; Fri, 01 Jun 2018 11:28:53 +0200 Received: from geert by ramsan with local (Exim 4.86_2) (envelope-from ) id 1fOgMf-0003BL-Gz; Fri, 01 Jun 2018 11:28:53 +0200 From: Geert Uytterhoeven To: Jia-Ju Bai , Jonathan Corbet , Michael Turquette , Stephen Boyd , Zhang Rui , Eduardo Valentin , Eric Anholt , Stefan Wahren , Greg Kroah-Hartman Cc: Sergey Senozhatsky , Petr Mladek , Linus Torvalds , Steven Rostedt , linux-doc@vger.kernel.org, linux-clk@vger.kernel.org, linux-pm@vger.kernel.org, linux-serial@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org, Geert Uytterhoeven Subject: [PATCH 0/4] lib/vsprintf: Remove atomic-unsafe support for printk format %pCr Date: Fri, 1 Jun 2018 11:28:18 +0200 Message-Id: <1527845302-12159-1-git-send-email-geert+renesas@glider.be> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi all, "%pCr" formats the current rate of a clock, and calls clk_get_rate(). The latter obtains a mutex, hence it must not be called from atomic context. As vsprintf() (and e.g. printk()) must be callable from any context, it's better to remove support for this (rarely-used) format. This patch series: - Changes all existing users of "%pCr" to print the result of clk_get_rate() directly, which is safe as they all do this in task context only, - Removes support for the "%pCr" printk format. Note that any remaining out-of-tree users will start seeing the clock's name printed instead of its rate. Thanks for your comments! Geert Uytterhoeven (4): clk: renesas: cpg-mssr: Stop using printk format %pCr thermal: bcm2835: Stop using printk format %pCr serial: sh-sci: Stop using printk format %pCr lib/vsprintf: Remove atomic-unsafe support for %pCr Documentation/core-api/printk-formats.rst | 3 +-- drivers/clk/renesas/renesas-cpg-mssr.c | 9 +++++---- drivers/thermal/broadcom/bcm2835_thermal.c | 4 ++-- drivers/tty/serial/sh-sci.c | 4 ++-- lib/vsprintf.c | 3 --- 5 files changed, 10 insertions(+), 13 deletions(-) -- 2.7.4 Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds