From patchwork Fri Mar 24 17:30:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rix X-Patchwork-Id: 74664 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp810728vqo; Fri, 24 Mar 2023 10:56:25 -0700 (PDT) X-Google-Smtp-Source: AKy350Z3cm8WhMMJPoNsdm8EABFOWCrPFL7vW0byCnkcu8cLk/LYUOMGkjg9aYp/uYkvrID5OsNe X-Received: by 2002:a17:906:980b:b0:932:4eea:17ce with SMTP id lm11-20020a170906980b00b009324eea17cemr3560850ejb.39.1679680585390; Fri, 24 Mar 2023 10:56:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679680585; cv=none; d=google.com; s=arc-20160816; b=AHdtj2mYAHAaJ2Pk21rrwzxkgjfTRCcFdpkORLA0q9SftwmkgbkOzbK6yEUOCyjD6y aPrr8PHZf4iMz6e92yC65AwoNopBFypMBNOcNzdHhy1N7AS3lGjLOhVSxOpsh8Y2DTdf V/AdC/UB1XDlJ9PxHE1W46jdqSWUZmTBI7aR3YHC2DUsop7s9jdWMmrarRXXApc0DUNZ PBZcAXODKcp5asRQiGydzyo8fMhVXgMC/Ynmte6e0ixJssVr/enUmVVGuqzTo80enlLh 2Bf8egzYI0DAB/T0HYpCz4kwYdXFkRpb6lhx8aTqa3o2S5c38JL94Hn5Y34RPFEXq4WJ bUtQ== 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=yS3LsgviE014HnSKQD34+joeCRTUmhUGUupA/8MRjOw=; b=UmdvywndfTacQbHvFgrafb9QeblMw8mtKBMxDveZAUSHX1GFbcm3DSjqlr1tOtEIVw O7lXBRG2AZwOQSuq1aKSwlHSsi3uMseoMTlP3mdMUvPuQqd5ghMl/TSje3jPdioI3bk5 oLShFhG8GQ8mfYRvh+GKYj+13at8UkXwA1x53Gj7drI8WBLuBJuwOJcd0cEGlgGZhXXB CK6+4AKuoP2TxmbPzfA2hWayIlfh2X8Vx56n9zQ3E64WQFIoUZ6KDhXs/MUyOyLVanJq oAy73Xor9gAOBJZHA6pUzCs8XbK8gzi4KKpuIEFR1uuLIchFwBdsVHZ1JQurlhka+q/H 1lWw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=E4x5iGoo; 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=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s4-20020a1709060c0400b0093349208719si15696305ejf.768.2023.03.24.10.56.02; Fri, 24 Mar 2023 10:56:25 -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=@redhat.com header.s=mimecast20190719 header.b=E4x5iGoo; 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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231725AbjCXRbp (ORCPT + 99 others); Fri, 24 Mar 2023 13:31:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53556 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231491AbjCXRbn (ORCPT ); Fri, 24 Mar 2023 13:31:43 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD49CC64C for ; Fri, 24 Mar 2023 10:31:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1679679062; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=yS3LsgviE014HnSKQD34+joeCRTUmhUGUupA/8MRjOw=; b=E4x5iGoo/KntDPrYUlzrlzNK305b9mYa2IKGfs2zNaxn4XahlEBdhAdeoKOIJ7zfp+UHYJ 5GUy3h9PZMNzRxSO2iAxqAvFS6w5vI54GsvB1LmwaWOfRRfUggWzzKyThww7rPXhEtf9Em utSkh7Bw95vNlpYNL4NDmzlqYpxNipM= Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-481-Aw7GHbIKO-idgDId2AtX8g-1; Fri, 24 Mar 2023 13:31:00 -0400 X-MC-Unique: Aw7GHbIKO-idgDId2AtX8g-1 Received: by mail-qt1-f198.google.com with SMTP id t22-20020ac86a16000000b003bd1c0f74cfso1413983qtr.20 for ; Fri, 24 Mar 2023 10:31:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679679060; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=yS3LsgviE014HnSKQD34+joeCRTUmhUGUupA/8MRjOw=; b=cC/px86s+1Zf/k2bJ3JoDq5/d7mYw9kpgx0c3sPqhJOoe2ObPX3r07Pq3hHDw7nlZO 5j1pjBMOsw9NR8/mznphXU7N5MS/Ka07xnTw6Dd1l/CZkDVRPHCOmrMT3IFXm1dYUEMm cvrihsN9Hnn5Tma0M7hcjKiboKV2Zp3xFK7REyu8zX8cbOhwNWODTzi1+ZcJCzKSKc4g uvIQqARoapokqyRdvgoJCN0sGebQn7jrwxTcrWoS8KuVbig0boACsbJTNlCN22YFY+am ZNhQjZNm0LrJ42F5Ua0tjzke7AC5zCLT7SLdJWo4t2XqnwvHeMrtuQpaTK5q38mSTuwe OGxQ== X-Gm-Message-State: AAQBX9c8Gght+EyfBh5HRixH+x19NTKBDXi2DeMZtFs/2B3696r5oeGu E81u+557DoKhAxUlFQD2drUPOods+Zf34VImsL14K1i9pPooDzG3a4FzcRMOwfqbRikT4klRpCP 5w92QmOK/YjcrDXJtNVvE5NzI X-Received: by 2002:ad4:5ce4:0:b0:5cd:3326:792 with SMTP id iv4-20020ad45ce4000000b005cd33260792mr6578283qvb.38.1679679059811; Fri, 24 Mar 2023 10:30:59 -0700 (PDT) X-Received: by 2002:ad4:5ce4:0:b0:5cd:3326:792 with SMTP id iv4-20020ad45ce4000000b005cd33260792mr6578253qvb.38.1679679059593; Fri, 24 Mar 2023 10:30:59 -0700 (PDT) Received: from dell-per740-01.7a2m.lab.eng.bos.redhat.com (nat-pool-bos-t.redhat.com. [66.187.233.206]) by smtp.gmail.com with ESMTPSA id cw2-20020ad44dc2000000b005dd8b9345aesm829312qvb.70.2023.03.24.10.30.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 24 Mar 2023 10:30:59 -0700 (PDT) From: Tom Rix To: linkinjeon@kernel.org, sfrench@samba.org, senozhatsky@chromium.org, tom@talpey.com, nathan@kernel.org, ndesaulniers@google.com Cc: linux-cifs@vger.kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, Tom Rix Subject: [PATCH] ksmbd: remove unused is_char_allowed function Date: Fri, 24 Mar 2023 13:30:56 -0400 Message-Id: <20230324173056.2652725-1-trix@redhat.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Spam-Status: No, score=2.1 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,TVD_SUBJ_WIPE_DEBT autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1761272749463895798?= X-GMAIL-MSGID: =?utf-8?q?1761272749463895798?= clang with W=1 reports fs/ksmbd/unicode.c:122:19: error: unused function 'is_char_allowed' [-Werror,-Wunused-function] static inline int is_char_allowed(char *ch) ^ This function is not used so remove it. Signed-off-by: Tom Rix Reviewed-by: Sergey Senozhatsky Acked-by: Namjae Jeon --- fs/ksmbd/unicode.c | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/fs/ksmbd/unicode.c b/fs/ksmbd/unicode.c index a0db699ddafd..9ae676906ed3 100644 --- a/fs/ksmbd/unicode.c +++ b/fs/ksmbd/unicode.c @@ -113,24 +113,6 @@ cifs_mapchar(char *target, const __u16 src_char, const struct nls_table *cp, goto out; } -/* - * is_char_allowed() - check for valid character - * @ch: input character to be checked - * - * Return: 1 if char is allowed, otherwise 0 - */ -static inline int is_char_allowed(char *ch) -{ - /* check for control chars, wildcards etc. */ - if (!(*ch & 0x80) && - (*ch <= 0x1f || - *ch == '?' || *ch == '"' || *ch == '<' || - *ch == '>' || *ch == '|')) - return 0; - - return 1; -} - /* * smb_from_utf16() - convert utf16le string to local charset * @to: destination buffer