From patchwork Sat Nov 24 09:06:42 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Dobriyan X-Patchwork-Id: 10696491 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3BBC216B1 for ; Sat, 24 Nov 2018 09:06:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 280FF29834 for ; Sat, 24 Nov 2018 09:06:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 18F4729BDA; Sat, 24 Nov 2018 09:06:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBBD129834 for ; Sat, 24 Nov 2018 09:06:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725751AbeKXTym (ORCPT ); Sat, 24 Nov 2018 14:54:42 -0500 Received: from mail-wr1-f53.google.com ([209.85.221.53]:37580 "EHLO mail-wr1-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725735AbeKXTym (ORCPT ); Sat, 24 Nov 2018 14:54:42 -0500 Received: by mail-wr1-f53.google.com with SMTP id j10so14260881wru.4 for ; Sat, 24 Nov 2018 01:06:45 -0800 (PST) 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=M+w7jJJzb1UCsQy/rkk/7d0QMBcvZZBM+5WJCJrKEzU=; b=Rs971Li6Zxjo5L89q2VUSbA51cvsofBIafeNlDnJKl0zgzUkBZ8FRwiSOyZHtH9ErP T/8ZcoCqi42RIZl844c1ZNDaEziTeB9mrXXZa62Q9WNDAOmNhtc6nx0rC5LtV05KFS25 Gg+nzEZdHqUorUf7Oxj1HmedtNvm7TcPLSnmDx/1edCsFO5L+pwYfXYDpwO9gDu17T/i Y1hlQiwFD++q/mTDFnz6SZ5E+3Pzgd2RONkC+ttsckBiz4b8zdpyV3jDtf5X39IYGI64 kYzD/Yz+zlBiStPm8oGtFJlkyFtWfoGSO/KF85Grcj+hf5Ma0KqBj8hqVbePedhi8Esl 2vLQ== 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=M+w7jJJzb1UCsQy/rkk/7d0QMBcvZZBM+5WJCJrKEzU=; b=Y91kOF4ogCAdhTRbpB6WH4K98zI56Qcwv9s2XIq5jwkbhwnkwhp81G2hZVBnXcI4tK OdP/ZQmXUGULukipi1qV67cv/KDPD7YUur+kEYQ2ipT2fS5eVzqxNICuhYepaxa0g2ms FkRomlr0R9LR40U9NG/Qzc0m3615lC1pQxleMvE00X+bf7BsPjgtrq12M9Sx/c8aMXfZ GDXk+e3tuV1kzfJFm/Nf/bs1Mx7+L6vAEVGKl2bmBWME/SAL5Bw1TWw8ltmYAeNBeCFw UJlJQXRN+qE2i8lwTgoqZInF5n+txyPwfZT7OQBRXXk6GU/OI1aEneIS/KEuJecJisf+ bIDw== X-Gm-Message-State: AA+aEWY0vT688awR7ZSqO22jSw9x22y2hzgheBQhySZFAmU1U42NKJig eCs5YOXZgVfubnPkx2WNQw== X-Google-Smtp-Source: AFSGD/WIyyOmAfE7PyRA6s4L7YZV7euLM7NseZRE/biUchlOk7BJeI3MESA5x1llQhzj2inmGCVZTA== X-Received: by 2002:a5d:4d46:: with SMTP id a6mr17185493wru.28.1543050404841; Sat, 24 Nov 2018 01:06:44 -0800 (PST) Received: from avx2 (nat-minsk-pool-46-53-201-92.telecom.by. [46.53.201.92]) by smtp.gmail.com with ESMTPSA id z9sm15775656wrs.63.2018.11.24.01.06.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 24 Nov 2018 01:06:44 -0800 (PST) Date: Sat, 24 Nov 2018 12:06:42 +0300 From: Alexey Dobriyan To: jaegeuk@kernel.org, yuchao0@huawei.com Cc: linux-f2fs-devel@lists.sourceforge.net, linux-fsdevel@vger.kernel.org Subject: [PATCH] f2fs: make "f2fs_fault_name[]" const char * Message-ID: <20181124090642.GA10969@avx2> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Those strings are immutable. Signed-off-by: Alexey Dobriyan Reviewed-by: Chao Yu --- fs/f2fs/f2fs.h | 2 +- fs/f2fs/super.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) --- a/fs/f2fs/f2fs.h +++ b/fs/f2fs/f2fs.h @@ -67,7 +67,7 @@ struct f2fs_fault_info { unsigned int inject_type; }; -extern char *f2fs_fault_name[FAULT_MAX]; +extern const char *f2fs_fault_name[FAULT_MAX]; #define IS_FAULT_SET(fi, type) ((fi)->inject_type & (1 << (type))) #endif --- a/fs/f2fs/super.c +++ b/fs/f2fs/super.c @@ -38,7 +38,7 @@ static struct kmem_cache *f2fs_inode_cachep; #ifdef CONFIG_F2FS_FAULT_INJECTION -char *f2fs_fault_name[FAULT_MAX] = { +const char *f2fs_fault_name[FAULT_MAX] = { [FAULT_KMALLOC] = "kmalloc", [FAULT_KVMALLOC] = "kvmalloc", [FAULT_PAGE_ALLOC] = "page alloc",