Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp3537344rwd; Mon, 22 May 2023 15:48:06 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4d5r85ALhQkPIedKdqI8+lGaWUNGohbJCUh4i4Q6q1XHDYnNSXfoiYrxR0egpj8dzOIsVA X-Received: by 2002:a05:6a20:4320:b0:100:6a95:c289 with SMTP id h32-20020a056a20432000b001006a95c289mr14641512pzk.5.1684795686103; Mon, 22 May 2023 15:48:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684795686; cv=none; d=google.com; s=arc-20160816; b=sS9g566iWvNf0NFC1P8Q4K8f1MhPAXZy7PpcRbRWSx/Rz5jzzvlJOKLbYroJ5kIxgw sPUI04Up5aMNKbM6eP6uRLcz932tvil2VKUI9WLUDrcfDiZzvxo3b/0xtGM3LBO5f4b9 QYRO0PUZ1TN5/YLrGe2yE7CZJ2i3qvZpny9O0h7w3hAreCdCRjBQSHqYWpYcj6fYP/TB kgDQtInziIo0ujdCiNbzdw03MKkcbzPXpLzC7HepODzAVaHVCMUFSkvNs6oalHX+nMIt t9bASvATPttIRAVtCWzAdNPSOvy5HOulDH6uuwLnTn8sb8mK1q27ReljmjLG44Ih1mC4 qJ2Q== 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=Q+GfNE4ubVjT179gBfoBxLQtdwvznkqzB7yn/xj4iqc=; b=bENZWsLkuz3ZXfHRH2nZvVc4B/wNn8s12WfyJDTMk5nFWMMGVotrrxRWGRjeaUez4r 3ZtGkPWk/sjL91SrUwKozlFJbYN54Zp8W4bxjlhus2dBNXzy+BVvrAc3ewoYIgQygDCc wcuZsx/Nu3l6rRtCN44m0A1c8h8E44tPQ2LYzjMgjaJf8D9620B9MbPKHXk04orWuNbH uQnSki+/0uItYtsz17ZjZ1vv/uAnthHzUsoyfSKve5zNRhEMhMJtYGvDjFXMqjEUUrRH OGHNwVDBdauVnMNFiSGChqlyrWH41Wfirc9O5n1IRc+6TkjSMUjQjY1NQFzo/2F06YIN QHHg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=QDA3Vm0R; 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 a25-20020a637f19000000b0050bcfe667e7si3026264pgd.474.2023.05.22.15.47.52; Mon, 22 May 2023 15:48:06 -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=QDA3Vm0R; 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 S234858AbjEVWjE (ORCPT + 99 others); Mon, 22 May 2023 18:39:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234818AbjEVWiy (ORCPT ); Mon, 22 May 2023 18:38:54 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 86164FE; Mon, 22 May 2023 15:38:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1684795133; x=1716331133; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=twPJPBQvSJdj8pszIWsTqK3k3eR4WJYwlwiK6V0ITV8=; b=QDA3Vm0R1QWzV//AFnxvACHd3Ge707D2iOKnxuP5bX57VkQUiG2YeMuL aW9PFz+CGSqmOeRguDYkbYFpn9EWHxQB37b3lN8e6vM/qTEfLuHbiAGRd RFDS9gOlgjuMaRaZRXVl2JVlVZa0SHMgupnVba76ESuPF9HlSTs13GH4x 90rGOxTKRmeV+j/7zaddZdP++kBdf4nsCeAsUtoRWzpBWsOjIi9iQUqO6 ClXn7izcKzaV60ONwCzQiXTsy/0N+ykPELO/iZ3qIhEzRntZ5AXszeKQc /+vFFe/Jc4DLaWnOMx3xubEvmRamAHdIfReVFCVGuTcoVoJ0ZJgqkjYXo A==; X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="351910515" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="351910515" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2023 15:38:50 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10718"; a="1033794760" X-IronPort-AV: E=Sophos;i="6.00,184,1681196400"; d="scan'208";a="1033794760" Received: from spandruv-desk.jf.intel.com ([10.54.75.8]) by fmsmga005.fm.intel.com with ESMTP; 22 May 2023 15:38:50 -0700 From: Srinivas Pandruvada To: rafael@kernel.org, rui.zhang@intel.com, daniel.lezcano@linaro.org Cc: linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Pandruvada , stable@vger.kernel.org Subject: [PATCH] thermal: int340x: Add new line for UUID display Date: Mon, 22 May 2023 15:38:44 -0700 Message-Id: <20230522223844.2330343-1-srinivas.pandruvada@linux.intel.com> X-Mailer: git-send-email 2.39.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Prior to the commit: "763bd29fd3d1 ("thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf()" there was a new line after each UUID string. With the newline removed, existing user space like "thermald" fails to compare each supported UUID as it is using getline() to read UUID and apply correct thermal table. To avoid breaking existing user space, add newline after each UUID string. Signed-off-by: Srinivas Pandruvada Fixes: 763bd29fd3d1 ("thermal: int340x_thermal: Use sysfs_emit_at() instead of scnprintf()") Cc: stable@vger.kernel.org # v6.3+ --- drivers/thermal/intel/int340x_thermal/int3400_thermal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c index 810231b59dcd..5e1164226ada 100644 --- a/drivers/thermal/intel/int340x_thermal/int3400_thermal.c +++ b/drivers/thermal/intel/int340x_thermal/int3400_thermal.c @@ -131,7 +131,7 @@ static ssize_t available_uuids_show(struct device *dev, for (i = 0; i < INT3400_THERMAL_MAXIMUM_UUID; i++) { if (priv->uuid_bitmap & (1 << i)) - length += sysfs_emit_at(buf, length, int3400_thermal_uuids[i]); + length += sysfs_emit_at(buf, length, "%s\n", int3400_thermal_uuids[i]); } return length; @@ -149,7 +149,7 @@ static ssize_t current_uuid_show(struct device *dev, for (i = 0; i <= INT3400_THERMAL_CRITICAL; i++) { if (priv->os_uuid_mask & BIT(i)) - length += sysfs_emit_at(buf, length, int3400_thermal_uuids[i]); + length += sysfs_emit_at(buf, length, "%s\n", int3400_thermal_uuids[i]); } if (length) -- 2.39.1