From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D4511C25B48 for ; Tue, 24 Oct 2023 14:31:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343496AbjJXOb6 (ORCPT ); Tue, 24 Oct 2023 10:31:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35952 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343666AbjJXOMX (ORCPT ); Tue, 24 Oct 2023 10:12:23 -0400 Received: from mx0a-0031df01.pphosted.com (mx0a-0031df01.pphosted.com [205.220.168.131]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6988EE8; Tue, 24 Oct 2023 07:12:21 -0700 (PDT) Received: from pps.filterd (m0279865.ppops.net [127.0.0.1]) by mx0a-0031df01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39OD19s1010611; Tue, 24 Oct 2023 14:11:53 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; h=message-id : date : mime-version : subject : to : cc : references : from : in-reply-to : content-type : content-transfer-encoding; s=qcppdkim1; bh=p9sOB031NYZ8rg3UqM90082ySLtrpR0E5gqeOS58yKA=; b=ejOv4aqW+X41opJBnFmtmFQbaQunWDmcO/lEmgpsQ42s8OQAwlekie3CRbkijCpU1IRF HhQmGdA22Izso1SJG2JC2XhR9H5sMg93nbr9bd86oHqIG/6EOs6nByp/b86sY8uCwDhA 5aXJpCJkow9WQ+C8HYWlEBvfnfWsmK8R11J3XDbagiDbHWnXbyi5AEVbuL+t9nTqfChm K1W0IhJU/647dbhzWGqasbjRvJxcr1ZJq4oBOhhPgG3V+bS27TUD38qcfirndF70OAk/ bLU4wlJZE/loxQA0/0WrpNf9cvBy1SxWRAv35mOw4Jm0s/AXXNOdYH9o10R2vdTQY2qv FA== Received: from nalasppmta03.qualcomm.com (Global_NAT1.qualcomm.com [129.46.96.20]) by mx0a-0031df01.pphosted.com (PPS) with ESMTPS id 3tx7r80xs3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 14:11:53 +0000 Received: from nalasex01a.na.qualcomm.com (nalasex01a.na.qualcomm.com [10.47.209.196]) by NALASPPMTA03.qualcomm.com (8.17.1.5/8.17.1.5) with ESMTPS id 39OEBq6d018331 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 14:11:52 GMT Received: from [10.48.243.236] (10.49.16.6) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.39; Tue, 24 Oct 2023 07:11:52 -0700 Message-ID: <90328e09-5e48-4bd0-ac67-62a104b6eb76@quicinc.com> Date: Tue, 24 Oct 2023 07:11:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ath10k: replace deprecated strncpy with strtomem_pad Content-Language: en-US To: Kalle Valo , Justin Stitt CC: , , , References: <20231013-strncpy-drivers-net-wireless-ath-ath10k-mac-c-v1-1-24e40201afa3@google.com> <87wmvcxjdy.fsf@kernel.org> From: Jeff Johnson In-Reply-To: <87wmvcxjdy.fsf@kernel.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.49.16.6] X-ClientProxiedBy: nalasex01b.na.qualcomm.com (10.47.209.197) To nalasex01a.na.qualcomm.com (10.47.209.196) X-QCInternal: smtphost X-Proofpoint-Virus-Version: vendor=nai engine=6200 definitions=5800 signatures=585085 X-Proofpoint-ORIG-GUID: JythYTgortCfUjIegZMu4FJzutgO0nLB X-Proofpoint-GUID: JythYTgortCfUjIegZMu4FJzutgO0nLB X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_14,2023-10-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxscore=0 adultscore=0 mlxlogscore=308 lowpriorityscore=0 bulkscore=0 phishscore=0 spamscore=0 clxscore=1015 priorityscore=1501 suspectscore=0 impostorscore=0 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310240122 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10/24/2023 6:03 AM, Kalle Valo wrote: > What about using just memcpy() to make it clear it's not really a proper > string: > > arvif->u.ap.ssid_len = 4; > memcpy(arvif->u.ap.ssid, "mesh", arvif->u.ap.ssid_len); > In the "changed & BSS_CHANGED_SSID" case that comes soon after this we just set the length and use memcpy without clearing the rest of the buffer, so doing the same here, as you suggest, would be consistent. /jeff