From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752748AbdCMNyW (ORCPT ); Mon, 13 Mar 2017 09:54:22 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:35084 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750799AbdCMNyP (ORCPT ); Mon, 13 Mar 2017 09:54:15 -0400 Date: Mon, 13 Mar 2017 19:26:24 +0530 From: simran singhal To: labbott@redhat.com Cc: Laura Abbott , Sumit Semwal , Greg Kroah-Hartman , Arve =?iso-8859-1?B?SGr4bm5lduVn?= , Riley Andrews , devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, outreachy-kernel@googlegroups.com Subject: [PATCH] staging: android: ion: Replace pr_err with dev_err Message-ID: <20170313135624.GA9869@singhal-Inspiron-5558> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org All devm functions has a device structure as the first argument which is required by dev_{err,info,dbg} printing functions. This patch converts pr_err to dev_err as dev_* is preferred after calls to devm functions. Done using coccinelle: @r1 exists@ expression e,e1; identifier f =~ "^devm_"; identifier g =~ "^pcim_"; identifier h =~ "^dmam_"; @@ e=\(f\|g\|h\)(e1,...); <+... ( - pr_info( + dev_info(e1, ...); | - pr_err( + dev_err(e1, ...); | - pr_debug( + dev_dbg(e1, ...); ) ...+> Signed-off-by: simran singhal --- drivers/staging/android/ion/ion_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/android/ion/ion_test.c b/drivers/staging/android/ion/ion_test.c index 5abf8320..0ab7d11 100644 --- a/drivers/staging/android/ion/ion_test.c +++ b/drivers/staging/android/ion/ion_test.c @@ -255,7 +255,7 @@ static int __init ion_test_probe(struct platform_device *pdev) testdev->misc.parent = &pdev->dev; ret = misc_register(&testdev->misc); if (ret) { - pr_err("failed to register misc device.\n"); + dev_err(&pdev->dev, "failed to register misc device.\n"); return ret; } -- 2.7.4