Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp4640078pxb; Thu, 14 Oct 2021 09:05:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrJTL4AxIukNm27FayBwiQJWS6nvhDwObMhlasNwtHYdD6B86e9bgtReGTOdvDX+5XGsCb X-Received: by 2002:a17:90a:62ca:: with SMTP id k10mr7134955pjs.38.1634227515241; Thu, 14 Oct 2021 09:05:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634227515; cv=none; d=google.com; s=arc-20160816; b=Yucb4eQGqKGoajPFgvl603/4ojnE58f8sRsNUvzNRqDSS8ZHjq8m4GMclQSsPTRVv1 uFQ1Hcu+x2OCmpDQlxrZM1J7BVjgPskCxOEM/JhaBMIQHhKgd0VsUVNooLqbMHRguORm +L4OoFxNgY3WiMotgBPvhvyoxOdR0C1L6yd3RigRECDGdNfc61xSeQ40tGMjVU2XxW8K JGDNfQLqScrlY50G5JJJM88AwxIqqhIxdMFdHXI2erh68Taa8SFjYQ9aROBtj1P8+Bs6 KEJ/xrST7/zdC+tdtWYymaPh2DB0QhsCdGcFie1+Ro3Sfh556BJkF6iWv3HSENOyHad3 QXog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=HS23AmkrFlxiHPWR55rkvfjGcqFY+NS9STXeF9NmTXw=; b=iz0XgDWBa1TR0IqjDSzRFpfinnSP0Rs2WMr8yObWUs+mEKa6AI4NHn+La8+p445oBQ BKZ3S5Lmz+kRpg6GJD+0l4vI6WGi8PE4MSNt+8XXfO/XxQOnNjoypRJ6Mbfqs4bPPFlJ wEC0tccf3Iu7cRZh7gVErTdYxcHg6sIv6Q4Vnwes7gPm8EAKPV7YbbaJqpekz4ari3L5 dWgMLZYpdXpIGEo22B3B/45eO9tvtdjf4V/SVlNVU8thE4EAh/n0SY/eHofcFxcoHcW1 wVj5ytaphDNJxb04Xsr9xsg2Sjp+gEW0T4rNTniRYIQe47RGngiAS975L4C+fGrGz0YP 8/vw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id a13si3795220plm.85.2021.10.14.09.04.58; Thu, 14 Oct 2021 09:05:15 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232117AbhJNO5k (ORCPT + 99 others); Thu, 14 Oct 2021 10:57:40 -0400 Received: from mail-wr1-f43.google.com ([209.85.221.43]:41778 "EHLO mail-wr1-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232079AbhJNO52 (ORCPT ); Thu, 14 Oct 2021 10:57:28 -0400 Received: by mail-wr1-f43.google.com with SMTP id t2so20386430wrb.8; Thu, 14 Oct 2021 07:55:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=HS23AmkrFlxiHPWR55rkvfjGcqFY+NS9STXeF9NmTXw=; b=YzHaNbOQOpCdQIt+loIbcz/rWpG+2hoEUVZqQOoqlFhg9QQ4iuSdIJUTm03IQRhhRU FMd0fPRvtxhmuYA/Xk3Aq4/690H1VL63S80RVzPveuUfWC31gWjpQqA+AUfeM77QFmbr bGufeQch5vyxpA5m4k/vM4IctqH9NydnXebDSdlRpzqajsHIRxhGzPCPNKRHrEvQ6B+w KkhFgP7uT2OWNRNjZyIDRGxBIfJIhmtgYMg0/AjdiuNRy1wI/kp6APqxLVn8UYfZBU5C F2A88NSe7+r+UcOkcQVt1R8VIUmWwxZPIoq0taI/NAkSIBfxIP1/QzKPOzwbOxtu+c5P 3lEA== X-Gm-Message-State: AOAM531Sb1swFp1OgezvkbaBHpk2m9wMs4vHIrzj5S7RZC0ooIM98J7V BlB+CVkYPeHctdrfD9TB+wDbscWjtLk= X-Received: by 2002:a5d:598a:: with SMTP id n10mr7156093wri.93.1634223322097; Thu, 14 Oct 2021 07:55:22 -0700 (PDT) Received: from ?IPV6:2a0b:e7c0:0:107::70f? ([2a0b:e7c0:0:107::70f]) by smtp.gmail.com with ESMTPSA id t18sm2664746wrm.81.2021.10.14.07.55.21 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 14 Oct 2021 07:55:21 -0700 (PDT) Message-ID: Date: Thu, 14 Oct 2021 16:55:20 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 Subject: Re: [PATCH] input&tty: Fix the keyboard led light display problem Content-Language: en-US To: Andy Shevchenko , lianzhi chang Cc: linux-kernel@vger.kernel.org, dmitry.torokhov@gmail.com, gregkh@linuxfoundation.org, linux-input@vger.kernel.org, 282827961@qq.com References: <20211014071627.23256-1-changlianzhi@uniontech.com> From: Jiri Slaby In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 14. 10. 21, 17:13, Andy Shevchenko wrote: > On Thu, Oct 14, 2021 at 03:16:27PM +0800, lianzhi chang wrote: >> Switching from the desktop environment to the tty environment, >> the state of the keyboard led lights and the state of the keyboard >> lock are inconsistent. This is because the attribute kb->kbdmode >> of the tty bound in the desktop environment (xorg) is set to >> VC_OFF, which causes the ledstate and kb->ledflagstate >> values of the bound tty to always be 0, which causes the switch >> from the desktop When to the tty environment, the LED light >> status is inconsistent with the keyboard lock status. > > ... > >> +void update_value_ledstate(unsigned int flag, unsigned int value) >> +{ >> + unsigned int bit; > > unsigned long bit; > > (see below why) You'd need ledstate to be ulong, not bit. Or am I missing something? -- js