From patchwork Mon Mar 12 17:02:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arushi Singhal X-Patchwork-Id: 884603 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="oAh9QNAO"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="XqPrtDIv"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 400PTX6g0Dz9sP3 for ; Tue, 13 Mar 2018 04:04:00 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-ID:Subject:To:From :Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=bYAyWvc2UBxwV3gmv5N1gszZKe0GYA+wqWNa9dnCtv4=; b=oAh9QNAOPGc4HE GnFGI6weGbE2XK6RQYoLBlt7U1ZFlTsXz0n6BAnsuio2zWTWcyD4R1I8QGKjVYoDoCmBZC3o4Schh Q93gNrfqHiw4pF8H9HZX8aUO6ROdpHF2yXLLbfuP0GimUaaKVkd+r/etaeyFzAXj4gX/N6xtv/D+/ WTDJRAkL0kht7f64j23Q+Nj4F+1U5sq3KU16EtYfr/ecut95Ry/VJwEHVtiAyihta13fFnAV4CaI0 6oSYMq7qGOBkb4bYh75a2xm2JsVL3qftBLYY8uyjFmde9hSGp/zZvGNYM+w3o0bDGeGYbepsQNmle fDhCj4n136/7THWEqsDA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.89 #1 (Red Hat Linux)) id 1evQrY-0007Xp-G1; Mon, 12 Mar 2018 17:03:52 +0000 Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]) by bombadil.infradead.org with esmtps (Exim 4.89 #1 (Red Hat Linux)) id 1evQqf-0006rg-TE for linux-mtd@lists.infradead.org; Mon, 12 Mar 2018 17:03:14 +0000 Received: by mail-pl0-x241.google.com with SMTP id w22-v6so9666419pll.2 for ; Mon, 12 Mar 2018 10:02:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=DjGHByOKtLlvaiaiFvh9aR07hk0RZpWa0QUj08VqPu4=; b=XqPrtDIvpamGbYFhEw9g3G+pKyuJRrllCQWn6IIs+9eTSqkQNoxKrcJ6EL9Vpqhgyc RP5OIeEcwP9b//AtpCDldWfwy55O+KP3jocDNlE1y+drRyHdfOcDocGEt6CA4SQjLaHc UkGvrJI8oi+pMXX/4xyhHmD2fx2JgGBelzxBAPDnpV560AUdWNfsvMEjQHzLGeHUjWRN rniN1XWFUi1fHOPpEa6c+OLopkoyMj7uHwx68hEaeqE5wBtUME+4wzAAKDV0tOryRz1h cIwNK3l+SauNddyBibgDKxfNJDWLVzQTdec/gc/GZNpRCoQof0u+Nu1uj7ByOKc9X5yG NNuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:user-agent; bh=DjGHByOKtLlvaiaiFvh9aR07hk0RZpWa0QUj08VqPu4=; b=bllaQo94abOW97rSt51ZmZClGq7GRVW6GHUIcTy1IkdcZSBSAIp7qc2Fqn4fbPs5pL eQ/eEN9L5CXVYbKsuZL9CFzZRmQsW0DVDpX4S+i5c8MmZWP8PsHmSI/u9xEYJPnhAq9P FNNZWmHYBk67VHsu5OqXWY80ga7iFgoh8/oO7CHNjrw7kAIEZGjgBGrqVIRyW2NBK7yz VdHo2q4aHb1QPuzO97ldmIeA1jqqD6+wHrD8dTxWyJs+JPWqlWDd3Ow8/wVQ4rfRlEEB 608q+pIElGFjhPX1isr7zktlf2jjGEkS9AttBXk4bH4Qg9yprvguKFHRfuFjSUeEHY52 ODiQ== X-Gm-Message-State: AElRT7FsQwu1kF8APbynC2p8KiLjcG0iTc53qQU8MVSZZaA9Kpv5LAcN V5FDF8BhtFEI09UIKQwKMZA= X-Google-Smtp-Source: AG47ELsfe9ChyX9JsT4MKpMdbtbGFJ1lSRXfizc2O042/FEWx7/PiZwALbjuaxLhnbYowACmdp+ryQ== X-Received: by 2002:a17:902:9349:: with SMTP id g9-v6mr8995039plp.319.1520874166811; Mon, 12 Mar 2018 10:02:46 -0700 (PDT) Received: from seema-Inspiron-15-3567 ([14.139.82.6]) by smtp.gmail.com with ESMTPSA id 76sm17704330pfp.53.2018.03.12.10.02.44 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 12 Mar 2018 10:02:45 -0700 (PDT) Date: Mon, 12 Mar 2018 22:32:08 +0530 From: Arushi Singhal To: dwmw2@infradead.org Subject: [PATCH] mtd: chips: Replace printk() with pr_*() and define pr_fmt() Message-ID: <20180312170208.GA10604@seema-Inspiron-15-3567> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.24 (2015-08-30) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180312_100300_123879_3EC0057E X-CRM114-Status: GOOD ( 16.03 ) X-Spam-Score: -1.8 (-) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-1.8 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c01:0:0:0:241 listed in] [list.dnswl.org] 0.2 FREEMAIL_ENVFROM_END_DIGIT Envelope-from freemail username ends in digit (arushisinghal19971997[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (arushisinghal19971997[at]gmail.com) -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-mtd@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Boris Brezillon , Richard Weinberger , linux-kernel@vger.kernel.org, Marek Vasut , linux-mtd@lists.infradead.org, Cyrille Pitchen , Brian Norris Sender: "linux-mtd" Errors-To: linux-mtd-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org Using pr_() is more concise than printk(KERN_). This patch: * Replace printks having a log level with the appropriate pr_*() macros. * Define pr_fmt() to include relevant name. * Remove redundant prefixes from pr_*() calls. * Indent the code where possible. Signed-off-by: Arushi Singhal --- drivers/mtd/chips/cfi_cmdset_0001.c | 119 ++++++++++++++++++------------------ 1 file changed, 58 insertions(+), 61 deletions(-) diff --git a/drivers/mtd/chips/cfi_cmdset_0001.c b/drivers/mtd/chips/cfi_cmdset_0001.c index 5e1b68c..90f56f5 100644 --- a/drivers/mtd/chips/cfi_cmdset_0001.c +++ b/drivers/mtd/chips/cfi_cmdset_0001.c @@ -17,6 +17,8 @@ * - auto unlock sectors on resume for auto locking flash on power up */ +#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt + #include #include #include @@ -182,7 +184,7 @@ static void fixup_convert_atmel_pri(struct mtd_info *mtd) memcpy(&atmel_pri, extp, sizeof(atmel_pri)); memset((char *)extp + 5, 0, sizeof(*extp) - 5); - printk(KERN_ERR "atmel Features: %02x\n", atmel_pri.Features); + pr_err("atmel Features: %02x\n", atmel_pri.Features); if (atmel_pri.Features & 0x01) /* chip erase supported */ features |= (1<<0); @@ -224,8 +226,7 @@ static void fixup_intel_strataflash(struct mtd_info *mtd) struct cfi_private *cfi = map->fldrv_priv; struct cfi_pri_intelext *extp = cfi->cmdset_priv; - printk(KERN_WARNING "cfi_cmdset_0001: Suspend " - "erase on write disabled.\n"); + pr_warn("Suspend erase on write disabled.\n"); extp->SuspendCmdSupport &= ~1; } #endif @@ -239,7 +240,7 @@ static void fixup_no_write_suspend(struct mtd_info *mtd) if (cfip && (cfip->FeatureSupport&4)) { cfip->FeatureSupport &= ~4; - printk(KERN_WARNING "cfi_cmdset_0001: write suspend disabled\n"); + pr_warn("write suspend disabled\n"); } } #endif @@ -282,13 +283,13 @@ static void fixup_LH28F640BF(struct mtd_info *mtd) /* Reset the Partition Configuration Register on LH28F640BF * to a single partition (PCR = 0x000): PCR is embedded into A0-A15. */ if (is_LH28F640BF(cfi)) { - printk(KERN_INFO "Reset Partition Config. Register: 1 Partition of 4 planes\n"); + pr_info("Reset Partition Config. Register: 1 Partition of 4 planes\n"); map_write(map, CMD(0x60), 0); map_write(map, CMD(0x04), 0); /* We have set one single partition thus * Simultaneous Operations are not allowed */ - printk(KERN_INFO "cfi_cmdset_0001: Simultaneous Operations disabled\n"); + pr_info("Simultaneous Operations disabled\n"); extp->FeatureSupport &= ~512; } } @@ -307,7 +308,7 @@ static void fixup_use_write_buffers(struct mtd_info *mtd) struct map_info *map = mtd->priv; struct cfi_private *cfi = map->fldrv_priv; if (cfi->cfiq->BufWriteTimeoutTyp) { - printk(KERN_INFO "Using buffer write method\n" ); + pr_info("Using buffer write method\n" ); mtd->_write = cfi_intelext_write_buffers; mtd->_writev = cfi_intelext_writev; } @@ -323,7 +324,7 @@ static void fixup_unlock_powerup_lock(struct mtd_info *mtd) struct cfi_pri_intelext *cfip = cfi->cmdset_priv; if (cfip->FeatureSupport&32) { - printk(KERN_INFO "Using auto-unlock on power-up/resume\n" ); + pr_info("Using auto-unlock on power-up/resume\n" ); mtd->flags |= MTD_POWERUP_LOCK; } } @@ -392,9 +393,8 @@ read_pri_intelext(struct map_info *map, __u16 adr) if (extp->MajorVersion != '1' || (extp->MinorVersion < '0' || extp->MinorVersion > '5')) { - printk(KERN_ERR " Unknown Intel/Sharp Extended Query " - "version %c.%c.\n", extp->MajorVersion, - extp->MinorVersion); + pr_err("Unknown Intel/Sharp Extended Query version %c.%c.\n", + extp->MajorVersion, extp->MinorVersion); kfree(extp); return NULL; } @@ -452,9 +452,7 @@ read_pri_intelext(struct map_info *map, __u16 adr) extp_size = sizeof(*extp) + extra_size; kfree(extp); if (extp_size > 4096) { - printk(KERN_ERR - "%s: cfi_pri_intelext is too fat\n", - __func__); + pr_err("%s: cfi_pri_intelext is too fat\n", __func__); return NULL; } goto again; @@ -519,7 +517,7 @@ struct mtd_info *cfi_cmdset_0001(struct map_info *map, int primary) #endif if(extp->SuspendCmdSupport & 1) { - printk(KERN_NOTICE "cfi_cmdset_0001: Erase suspend on write enabled\n"); + pr_notice("Erase suspend on write enabled\n"); } } else if (cfi->cfi_mode == CFI_MODE_JEDEC) { @@ -622,15 +620,15 @@ static struct mtd_info *cfi_intelext_setup(struct mtd_info *mtd) if (offset != devsize) { /* Argh */ - printk(KERN_WARNING "Sum of regions (%lx) != total size of set of interleaved chips (%lx)\n", offset, devsize); + pr_warn("Sum of regions (%lx) != total size of set of interleaved chips (%lx)\n", offset, devsize); goto setup_err; } for (i=0; inumeraseregions;i++){ - printk(KERN_DEBUG "erase region %d: offset=0x%llx,size=0x%x,blocks=%d\n", - i,(unsigned long long)mtd->eraseregions[i].offset, - mtd->eraseregions[i].erasesize, - mtd->eraseregions[i].numblocks); + pr_debug("erase region %d: offset=0x%llx,size=0x%x,blocks=%d\n", + i,(unsigned long long)mtd->eraseregions[i].offset, + mtd->eraseregions[i].erasesize, + mtd->eraseregions[i].numblocks); } #ifdef CONFIG_MTD_OTP @@ -722,10 +720,10 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, prinfo = (struct cfi_intelext_programming_regioninfo *)&extp->extra[offs]; mtd->writesize = cfi->interleave << prinfo->ProgRegShift; mtd->flags &= ~MTD_BIT_WRITEABLE; - printk(KERN_DEBUG "%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n", - map->name, mtd->writesize, - cfi->interleave * prinfo->ControlValid, - cfi->interleave * prinfo->ControlInvalid); + pr_debug("%s: program region size/ctrl_valid/ctrl_inval = %d/%d/%d\n", + map->name, mtd->writesize, + cfi->interleave * prinfo->ControlValid, + cfi->interleave * prinfo->ControlInvalid); } /* @@ -736,9 +734,8 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, partshift = cfi->chipshift - __ffs(numparts); if ((1 << partshift) < mtd->erasesize) { - printk( KERN_ERR - "%s: bad number of hw partitions (%d)\n", - __func__, numparts); + pr_err("%s: bad number of hw partitions (%d)\n", + __func__, numparts); return -EINVAL; } @@ -771,10 +768,10 @@ static int cfi_intelext_partition_fixup(struct mtd_info *mtd, } } - printk(KERN_DEBUG "%s: %d set(s) of %d interleaved chips " - "--> %d partitions of %d KiB\n", - map->name, cfi->numchips, cfi->interleave, - newcfi->numchips, 1<<(newcfi->chipshift-10)); + pr_debug("%s: %d set(s) of %d interleaved chips " + "--> %d partitions of %d KiB\n", + map->name, cfi->numchips, cfi->interleave, + newcfi->numchips, 1<<(newcfi->chipshift-10)); map->fldrv_priv = newcfi; *pcfi = newcfi; @@ -853,7 +850,7 @@ static int chip_ready (struct map_info *map, struct flchip *chip, unsigned long /* Urgh. Resume and pretend we weren't here. * Make sure we're in 'read status' mode if it had finished */ put_chip(map, chip, adr); - printk(KERN_ERR "%s: Chip not ready after erase " + pr_err("%s: Chip not ready after erase " "suspended: status = 0x%lx\n", map->name, status.x[0]); return -EIO; } @@ -1057,7 +1054,7 @@ static void put_chip(struct map_info *map, struct flchip *chip, unsigned long ad case FL_JEDEC_QUERY: break; default: - printk(KERN_ERR "%s: put_chip() called with oldstate %d!!\n", map->name, chip->oldstate); + pr_err("%s: put_chip() called with oldstate %d!!\n", map->name, chip->oldstate); } wake_up(&chip->wq); } @@ -1436,7 +1433,7 @@ static int cfi_intelext_unpoint(struct mtd_info *mtd, loff_t from, size_t len) if(chip->ref_point_counter == 0) chip->state = FL_READY; } else { - printk(KERN_ERR "%s: Error: unpoint called on non pointed region\n", map->name); + pr_err("%s: Error: unpoint called on non pointed region\n", map->name); err = -EINVAL; } @@ -1560,7 +1557,7 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, chip->word_write_time_max); if (ret) { xip_enable(map, chip, adr); - printk(KERN_ERR "%s: word write error (status timeout)\n", map->name); + pr_err("%s: word write error (status timeout)\n", map->name); goto out; } @@ -1577,10 +1574,10 @@ static int __xipram do_write_oneword(struct map_info *map, struct flchip *chip, if (chipstatus & 0x02) { ret = -EROFS; } else if (chipstatus & 0x08) { - printk(KERN_ERR "%s: word write error (bad VPP)\n", map->name); + pr_err("%s: word write error (bad VPP)\n", map->name); ret = -EIO; } else { - printk(KERN_ERR "%s: word write error (status 0x%lx)\n", map->name, chipstatus); + pr_err("%s: word write error (status 0x%lx)\n", map->name, chipstatus); ret = -EINVAL; } @@ -1723,7 +1720,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, status = map_read(map, cmd_adr); if (map_word_bitsset(map, status, CMD(0x30))) { xip_enable(map, chip, cmd_adr); - printk(KERN_WARNING "SR.4 or SR.5 bits set in buffer write (status %lx). Clearing.\n", status.x[0]); + pr_warn("SR.4 or SR.5 bits set in buffer write (status %lx). Clearing.\n", status.x[0]); xip_disable(map, chip, cmd_adr); map_write(map, CMD(0x50), cmd_adr); map_write(map, CMD(0x70), cmd_adr); @@ -1741,8 +1738,8 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, map_write(map, CMD(0x50), cmd_adr); map_write(map, CMD(0x70), cmd_adr); xip_enable(map, chip, cmd_adr); - printk(KERN_ERR "%s: Chip not ready for buffer write. Xstatus = %lx, status = %lx\n", - map->name, Xstatus.x[0], status.x[0]); + pr_err("%s: Chip not ready for buffer write. Xstatus = %lx, status = %lx\n", + map->name, Xstatus.x[0], status.x[0]); goto out; } @@ -1806,7 +1803,7 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, map_write(map, CMD(0x70), cmd_adr); chip->state = FL_STATUS; xip_enable(map, chip, cmd_adr); - printk(KERN_ERR "%s: buffer write error (status timeout)\n", map->name); + pr_err("%s: buffer write error (status timeout)\n", map->name); goto out; } @@ -1823,10 +1820,10 @@ static int __xipram do_write_buffer(struct map_info *map, struct flchip *chip, if (chipstatus & 0x02) { ret = -EROFS; } else if (chipstatus & 0x08) { - printk(KERN_ERR "%s: buffer write error (bad VPP)\n", map->name); + pr_err("%s: buffer write error (bad VPP)\n", map->name); ret = -EIO; } else { - printk(KERN_ERR "%s: buffer write error (status 0x%lx)\n", map->name, chipstatus); + pr_err("%s: buffer write error (status 0x%lx)\n", map->name, chipstatus); ret = -EINVAL; } @@ -1942,7 +1939,7 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; xip_enable(map, chip, adr); - printk(KERN_ERR "%s: block erase error: (status timeout)\n", map->name); + pr_err("%s: block erase error: (status timeout)\n", map->name); goto out; } @@ -1961,23 +1958,23 @@ static int __xipram do_erase_oneblock(struct map_info *map, struct flchip *chip, xip_enable(map, chip, adr); if ((chipstatus & 0x30) == 0x30) { - printk(KERN_ERR "%s: block erase error: (bad command sequence, status 0x%lx)\n", map->name, chipstatus); + pr_err("%s: block erase error: (bad command sequence, status 0x%lx)\n", map->name, chipstatus); ret = -EINVAL; } else if (chipstatus & 0x02) { /* Protection bit set */ ret = -EROFS; } else if (chipstatus & 0x8) { /* Voltage */ - printk(KERN_ERR "%s: block erase error: (bad VPP)\n", map->name); + pr_err("%s: block erase error: (bad VPP)\n", map->name); ret = -EIO; } else if (chipstatus & 0x20 && retries--) { - printk(KERN_DEBUG "block erase failed at 0x%08lx: status 0x%lx. Retrying...\n", adr, chipstatus); + pr_debug("block erase failed at 0x%08lx: status 0x%lx. Retrying...\n", adr, chipstatus); DISABLE_VPP(map); put_chip(map, chip, adr); mutex_unlock(&chip->mutex); goto retry; } else { - printk(KERN_ERR "%s: block erase failed at 0x%08lx (status 0x%lx)\n", map->name, adr, chipstatus); + pr_err("%s: block erase failed at 0x%08lx (status 0x%lx)\n", map->name, adr, chipstatus); ret = -EIO; } @@ -2073,8 +2070,8 @@ static int __xipram do_printlockstatus_oneblock(struct map_info *map, unsigned long adr, int len, void *thunk) { - printk(KERN_DEBUG "block status register for 0x%08lx is %x\n", - adr, do_getlockstatus_oneblock(map, chip, adr, len, thunk)); + pr_debug("block status register for 0x%08lx is %x\n", + adr, do_getlockstatus_oneblock(map, chip, adr, len, thunk)); return 0; } #endif @@ -2131,7 +2128,7 @@ static int __xipram do_xxlock_oneblock(struct map_info *map, struct flchip *chip map_write(map, CMD(0x70), adr); chip->state = FL_STATUS; xip_enable(map, chip, adr); - printk(KERN_ERR "%s: block unlock error: (status timeout)\n", map->name); + pr_err("%s: block unlock error: (status timeout)\n", map->name); goto out; } @@ -2147,8 +2144,8 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) int ret; #ifdef DEBUG_LOCK_BITS - printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n", - __func__, ofs, len); + pr_debug("%s: lock status before, ofs=0x%08llx, len=0x%08X\n", + __func__, ofs, len); cfi_varsize_frob(mtd, do_printlockstatus_oneblock, ofs, len, NULL); #endif @@ -2157,8 +2154,8 @@ static int cfi_intelext_lock(struct mtd_info *mtd, loff_t ofs, uint64_t len) ofs, len, DO_XXLOCK_ONEBLOCK_LOCK); #ifdef DEBUG_LOCK_BITS - printk(KERN_DEBUG "%s: lock status after, ret=%d\n", - __func__, ret); + pr_debug("%s: lock status after, ret=%d\n", + __func__, ret); cfi_varsize_frob(mtd, do_printlockstatus_oneblock, ofs, len, NULL); #endif @@ -2171,8 +2168,8 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) int ret; #ifdef DEBUG_LOCK_BITS - printk(KERN_DEBUG "%s: lock status before, ofs=0x%08llx, len=0x%08X\n", - __func__, ofs, len); + pr_debug("%s: lock status before, ofs=0x%08llx, len=0x%08X\n", + __func__, ofs, len); cfi_varsize_frob(mtd, do_printlockstatus_oneblock, ofs, len, NULL); #endif @@ -2181,8 +2178,8 @@ static int cfi_intelext_unlock(struct mtd_info *mtd, loff_t ofs, uint64_t len) ofs, len, DO_XXLOCK_ONEBLOCK_UNLOCK); #ifdef DEBUG_LOCK_BITS - printk(KERN_DEBUG "%s: lock status after, ret=%d\n", - __func__, ret); + pr_debug("%s: lock status after, ret=%d\n", + __func__, ret); cfi_varsize_frob(mtd, do_printlockstatus_oneblock, ofs, len, NULL); #endif @@ -2520,7 +2517,7 @@ static int cfi_intelext_suspend(struct mtd_info *mtd) */ } else { /* There seems to be an operation pending. We must wait for it. */ - printk(KERN_NOTICE "Flash device refused suspend due to pending operation (oldstate %d)\n", chip->oldstate); + pr_notice("Flash device refused suspend due to pending operation (oldstate %d)\n", chip->oldstate); ret = -EAGAIN; } break; @@ -2529,7 +2526,7 @@ static int cfi_intelext_suspend(struct mtd_info *mtd) allowed to. Or should we return -EAGAIN, because the upper layers ought to have already shut down anything which was using the device anyway? The latter for now. */ - printk(KERN_NOTICE "Flash device refused suspend due to active operation (state %d)\n", chip->state); + pr_notice("Flash device refused suspend due to active operation (state %d)\n", chip->state); ret = -EAGAIN; case FL_PM_SUSPENDED: break;