Received: by 10.223.185.116 with SMTP id b49csp3741884wrg; Mon, 19 Feb 2018 05:19:59 -0800 (PST) X-Google-Smtp-Source: AH8x2258R4dRNYNC4/nP6XOxU0cqD424q3FiaZOuADEcxEK6qFtB2/aJ/AXJEqr300BSspflj9g4 X-Received: by 10.98.141.208 with SMTP id p77mr14504453pfk.5.1519046399646; Mon, 19 Feb 2018 05:19:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519046399; cv=none; d=google.com; s=arc-20160816; b=DokOolfuWy8H1dmTYHGM04GHOtGd67CB0qk0fQfGP48GobafROixu0nSTZwK6jxCi4 6Jhk3/8m+nf7wMFgnfWGqDPWm9YBXe6XMh5FLJDZhz4h/MsCQU6pSsEt1Xyd7aIS+nCF 6MHrMYtADG9dGmyX2Ukd0eeKaUF6tIhSlqj7Hat/YxooR5x/ROYqAj5Y0E2jVTp4k6RO cxh1H/bADLf+pDrrIKfAHVxKFSW5ax54Vdcea2SpM9VfCM4SNocLjjj2Pxw5LKw0PMTH BN4yuGQPPcWGWYv6IMUgiajDKEJoNU1uXH5GH5jzWyrsMJ6Pir0hiuvrJN7Pu0ZGdKDH JAcg== 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 :dkim-signature:arc-authentication-results; bh=Q+gHhwLPC77JwOOyhZIll9Mi9ebJzOBjJ2I//E41Re0=; b=W7+6jAlW4thGKdgStDIWNQ15pVzedzj1EALsyfR8GwCltJRzlex0Rv+75NVPs4SGWM ixILk5Mvm6zKc/0/S/sQH6b/icv5rq+jWn6fJIEfI2ntNBS6A2GlMnYWFVOAXUyDCtEv FHONx/tSFy09kN2/IPXLDhu8dxZD5TuhnKSYyAk2vauDXMX1CI4tGWCitdVD0tUwSOYq EFIGIz7xtd/OsNlD7jl9v3lpLi5lzepI8dneNJ9KjxQcrRVoSzmxx0EOhXVjGhDxo6cD npQoAEwd2iU1hfPSo4VsXZE3J5qXEsEeAt3C4bYQwODA445tsf3J+toqgRuBJ0Me6Lde tUlw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdaROg9n; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id j10-v6si6094312plg.657.2018.02.19.05.19.45; Mon, 19 Feb 2018 05:19:59 -0800 (PST) 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; dkim=pass header.i=@gmail.com header.s=20161025 header.b=pdaROg9n; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752766AbeBSNTF (ORCPT + 99 others); Mon, 19 Feb 2018 08:19:05 -0500 Received: from mail-pf0-f195.google.com ([209.85.192.195]:33461 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752666AbeBSNTE (ORCPT ); Mon, 19 Feb 2018 08:19:04 -0500 Received: by mail-pf0-f195.google.com with SMTP id b8so2069784pfh.0 for ; Mon, 19 Feb 2018 05:19:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=Q+gHhwLPC77JwOOyhZIll9Mi9ebJzOBjJ2I//E41Re0=; b=pdaROg9nMgj+T+YJaNPZ2TELc/d0LObJydX9vWcZt1RQqrdyvXZ2R2XSzld2t3GFLe 1PXm0yKQYhqb+TYlqsyVHF4EEXwBXaIyZwwO/GYPa+GmITVt21Jkr6qyOEF8jKbkta/L TVfgloZo+Jqe8dSC6vx6+JXCPhLzotH8eXuDTqiHqHZ0g+WmczP5OAWGk+xsy8aYCBPZ rKPpB1LLwy12Md352YQtavoiMpRR5NCKqXLNX+NAtHwT/JHfVvhOP15ZHpC5aT2Wk0QB Te8q2jrwnY1VOv1WmqKyYSB9teqt4cQbIU4GxYgc3QDeh+6Ak790Ll/AzYSC9DCuk/rq 5zag== 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=Q+gHhwLPC77JwOOyhZIll9Mi9ebJzOBjJ2I//E41Re0=; b=fMTjFqGkH1FPQRsHhFLXg1HdVy6wOVqBsqu9ZAmDiBbARne4QfNd+jErX7v1RbrlRM fBIYH1j3m6Cl9i2AwfXCjMuZ0erlEMrUm64/BZQIKyC4Jd2XXPhK2w3EtMCJ3Jf+trXB tnOzAIZOC+UUnF1JOHiAJA0aWlxINfIyed73VBKwUQjVu1v7C6c8/vsy/jBiVZTyqVO6 YrkfCCf85kpPUphWzzTGzUmO2e0HX5quhR+VqOngwZzhowL4sthsvkGZr4BuvmREtKqa gZ0axgPqJBqBd7gE58q3C4AZb8mcMpcf6hLP7vxfJrZfjtLBPJQI0k5IMNzl+t0cYUn/ vO5g== X-Gm-Message-State: APf1xPCDt5RUuSAHczqWbb/kYKTDvrK/+699Zeku6toH9sCjVgqpkV5U Lghv32r1iOOclNPF4qykmYs= X-Received: by 10.99.113.75 with SMTP id b11mr12539735pgn.271.1519046344002; Mon, 19 Feb 2018 05:19:04 -0800 (PST) Received: from shreeya-VirtualBox ([103.212.140.144]) by smtp.gmail.com with ESMTPSA id z125sm53333841pfz.27.2018.02.19.05.19.02 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 19 Feb 2018 05:19:03 -0800 (PST) From: Shreeya Patel To: boris.brezillon@free-electrons.com, richard@nod.at, dwmw2@infradead.org, computersforpeace@gmail.com, marek.vasut@gmail.com, cyrille.pitchen@wedev4u.fr, maximlevitsky@gmail.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, ezequiel@vanguardiasur.com.ar, outreachy-kernel@googlegroups.com Cc: Shreeya Patel Subject: [PATCH NAND] mtd: nand: Replace printk() with appropriate dev_*macro() Date: Mon, 19 Feb 2018 18:48:59 +0530 Message-Id: <1519046339-9678-1-git-send-email-shreeya.patel23498@gmail.com> 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 Replace printks having a log level with the appropriate dev_*macro. Also, use pdev->dev as it is guaranteed in each case to be properly initialized when passed into dev_*macro(). Signed-off-by: Shreeya Patel --- drivers/mtd/nand/ams-delta.c | 6 ++++-- drivers/mtd/nand/cafe_nand.c | 5 +++-- drivers/mtd/nand/sh_flctl.c | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/mtd/nand/ams-delta.c b/drivers/mtd/nand/ams-delta.c index dcec9cf..2419ca8 100644 --- a/drivers/mtd/nand/ams-delta.c +++ b/drivers/mtd/nand/ams-delta.c @@ -185,7 +185,8 @@ static int ams_delta_init(struct platform_device *pdev) /* Allocate memory for MTD device structure and private data */ this = kzalloc(sizeof(struct nand_chip), GFP_KERNEL); if (!this) { - printk (KERN_WARNING "Unable to allocate E3 NAND MTD device structure.\n"); + dev_warn(&pdev->dev, + "Unable to allocate E3 NAND MTD device structure.\n"); err = -ENOMEM; goto out; } @@ -219,7 +220,8 @@ static int ams_delta_init(struct platform_device *pdev) this->dev_ready = ams_delta_nand_ready; } else { this->dev_ready = NULL; - printk(KERN_NOTICE "Couldn't request gpio for Delta NAND ready.\n"); + dev_notice(&pdev->dev, + "Couldn't request gpio for Delta NAND ready.\n"); } /* 25 us command delay time */ this->chip_delay = 30; diff --git a/drivers/mtd/nand/cafe_nand.c b/drivers/mtd/nand/cafe_nand.c index bc558c4..51f58ea 100644 --- a/drivers/mtd/nand/cafe_nand.c +++ b/drivers/mtd/nand/cafe_nand.c @@ -773,8 +773,9 @@ static int cafe_nand_probe(struct pci_dev *pdev, cafe->nand.bbt_td = &cafe_bbt_main_descr_512; cafe->nand.bbt_md = &cafe_bbt_mirror_descr_512; } else { - printk(KERN_WARNING "Unexpected NAND flash writesize %d. Aborting\n", - mtd->writesize); + dev_warn(&cafe->pdev->dev, + "Unexpected NAND flash writesize %d. Aborting\n", + mtd->writesize); goto out_free_dma; } cafe->nand.ecc.mode = NAND_ECC_HW_SYNDROME; diff --git a/drivers/mtd/nand/sh_flctl.c b/drivers/mtd/nand/sh_flctl.c index e7f3c98..c534c49 100644 --- a/drivers/mtd/nand/sh_flctl.c +++ b/drivers/mtd/nand/sh_flctl.c @@ -877,7 +877,7 @@ static void flctl_cmdfunc(struct mtd_info *mtd, unsigned int command, else if (!flctl->seqin_column) execmd_write_page_sector(mtd); else - printk(KERN_ERR "Invalid address !?\n"); + dev_err(&flctl->pdev->dev, "Invalid address !?\n"); break; } set_cmd_regs(mtd, command, (command << 8) | NAND_CMD_SEQIN); -- 2.7.4