Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752829AbbHFXEh (ORCPT ); Thu, 6 Aug 2015 19:04:37 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38904 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932326AbbHFXEN (ORCPT ); Thu, 6 Aug 2015 19:04:13 -0400 From: Salah Triki To: minchan@kernel.org, ngupta@vflare.org, sergey.senozhatsky.work@gmail.com Cc: linux-kernel@vger.kernel.org, Salah Triki Subject: [PATCH 2/3] zram: Replace pr_info with dev_info in comp_algorithm_store Date: Fri, 7 Aug 2015 00:03:52 +0100 Message-Id: <8a155b1ea18b34ea250b22b1f2696e8ba698e0e6.1438899649.git.salah.triki@acm.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: <4d44e053b19e255c76be153a2286859411315de8.1438899649.git.salah.triki@acm.org> References: <4d44e053b19e255c76be153a2286859411315de8.1438899649.git.salah.triki@acm.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1040 Lines: 28 dev_info attachs the message to the device. And, the algorithm's name, that triggers the error, is added to the message. --- drivers/block/zram/zram_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index bb284db..1c2f8b9 100644 --- a/drivers/block/zram/zram_drv.c +++ b/drivers/block/zram/zram_drv.c @@ -369,7 +369,8 @@ static ssize_t comp_algorithm_store(struct device *dev, down_write(&zram->init_lock); if (init_done(zram)) { up_write(&zram->init_lock); - pr_info("Can't change algorithm for initialized device\n"); + dev_info(dev, "Can't change algorithm to %s for initialized device\n", + buf); return -EBUSY; } strlcpy(zram->compressor, buf, sizeof(zram->compressor)); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/