Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp19358536rwd; Wed, 28 Jun 2023 08:18:15 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4m5sTNymxe4M1sEikrJKNxQ5Ap5lo1Kd9BhO6uEkIVCDUIKdmyLbbEKYj3LoAoKX9XQbwB X-Received: by 2002:a05:6a20:3ca2:b0:12c:7528:d981 with SMTP id b34-20020a056a203ca200b0012c7528d981mr820027pzj.18.1687965494899; Wed, 28 Jun 2023 08:18:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687965494; cv=none; d=google.com; s=arc-20160816; b=BaoZyTOsxi0EZ5I38Twifdj2a52uZY7uxSUl1gunAS4aWDxNth5qaIt4GL9S1apc73 3FQw4mEiRl6dnysmPhxSYFkhqGiZZRTTK0rkFk19DUBJ9nt2HyZZg/xmG0z9KBSl7HyB a+O9p8nEhy9mWcxypRjfunQmOM/U2Bb83CqzecWo82Pzly1DBDU2myFVdELcp9oUGsUU vKdbpwdKgzo0M3VPAe9h0YSuAcRSlviwVwGQ7NfEjUXR/q1PQvewIGyUFG2Fg+RT/vb9 A6wD0FwfGHh8UAX2KcwWJHSR4larskvtmQ5j436zYu5H4iyKcFqFOUf/2dO25b9vIEix D+uA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=kblpPaMOMJ5krQu789DhNdxSi2f14Uxv7ol6nfeg8+g=; fh=yM4bEVF+hoT9lSLtIMAhXwTkxv4DZ8BDBzGwnRDCcoo=; b=yjPsd1bHsc8BKulYSbuQOufX8QGb7/I386Zrzfd4WinEcuAXB43gtBktBLqBIzReq5 dIpOl6KrtyuUXuOcgbZKDRcJ9hZCwIZhZmRrFFp4M0fp0GFBQE/tuxXS2v4w2HF/ZaZA 7EqcbKGWc86Mc1zyOT5z7rwkQ9dJsnsdetx/mo0KCw2Zi/WREgdOOsrWXe60FdEsChgZ vs3X1sy1O7zog96C+OdqSoVXfco9LVnubmoLPrMrBkq3klyb+dw7D+UiZkkX+rXp89qZ NNjA80BKTBbsSs/6IT/pB1U5uiopNSxrtPmvMFyQxe7qslpcYv7NviTBjfJ/XGUcSM06 WXqQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NVudJMnQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w8-20020a63f508000000b00553a56f7b36si9813850pgh.522.2023.06.28.08.17.44; Wed, 28 Jun 2023 08:18:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=NVudJMnQ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231977AbjF1PEH (ORCPT + 99 others); Wed, 28 Jun 2023 11:04:07 -0400 Received: from mga17.intel.com ([192.55.52.151]:32511 "EHLO mga17.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231940AbjF1PEC (ORCPT ); Wed, 28 Jun 2023 11:04:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1687964642; x=1719500642; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=1gfH1VI8rikXgJa4+jQmJEeCxlL86Kd/v1XPUYZdwvk=; b=NVudJMnQQpNBXm1om++DAR4sS4WMQ8gE4efb/0CLFQM76Pk2ZJPOZyUd gV05B/sGO606TeinZmruLvg+WHeBDKLQViRo9sjbX13+nw+EeuZ05+j1R vjq2kcTNJZu7vjaG1KRAYXet2Zr+TzWSJl5MaK5VHEUCG1uMhD2mxdbxA Rh82Rb9qOzcTns15KY8rcORNds/gjR9djm5swbbi2z46iy9FlfmhVngR6 vak63fITaSc9775wpcarZyNKJ2f5eogqgfQk9W4cDeYHS2aE8xlMqaN5m ZanDOCcgK+PJ7OaXIY0a5oR6SuY7wafDLNvEKhGbMmoWe5rdz2A9TmSwj A==; X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="342206006" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="342206006" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jun 2023 08:02:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10755"; a="667159873" X-IronPort-AV: E=Sophos;i="6.01,165,1684825200"; d="scan'208";a="667159873" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga003.jf.intel.com with ESMTP; 28 Jun 2023 08:02:46 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 63569E1; Wed, 28 Jun 2023 18:02:47 +0300 (EEST) From: Andy Shevchenko To: Jaegeuk Kim , Chao Yu , linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org Cc: Steven Rostedt , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 1/1] f2fs: Use return value of strreplace() Date: Wed, 28 Jun 2023 18:02:43 +0300 Message-Id: <20230628150243.17771-1-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since strreplace() returns the pointer to the string itself, we may use it directly in the code. Signed-off-by: Andy Shevchenko --- include/trace/events/f2fs.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/include/trace/events/f2fs.h b/include/trace/events/f2fs.h index 793f82cc1515..f5994515290c 100644 --- a/include/trace/events/f2fs.h +++ b/include/trace/events/f2fs.h @@ -2234,13 +2234,11 @@ DECLARE_EVENT_CLASS(f2fs__rw_start, * because this screws up the tooling that parses * the traces. */ - __assign_str(pathbuf, pathname); - (void)strreplace(__get_str(pathbuf), ' ', '_'); + __assign_str(pathbuf, strreplace(pathname, ' ', '_')); __entry->offset = offset; __entry->bytes = bytes; __entry->i_size = i_size_read(inode); - __assign_str(cmdline, command); - (void)strreplace(__get_str(cmdline), ' ', '_'); + __assign_str(cmdline, strreplace(command, ' ', '_')); __entry->pid = pid; __entry->ino = inode->i_ino; ), -- 2.40.0.1.gaa8946217a0b