From: Ivaylo Dimitrov <ivo.g.dimitrov.75@gmail.com>
To: Denis Kenzior <denkenz@gmail.com>, ofono@lists.linux.dev
Cc: absicsz@gmail.com, merlijn@wizzup.org
Subject: Re: [PATCH] qmi: sim: Implement query_facility_lock(LockedPins property)
Date: Mon, 18 Nov 2024 19:01:18 +0200 [thread overview]
Message-ID: <82438d23-e666-a480-e79a-ba62a3d70504@gmail.com> (raw)
In-Reply-To: <908f9eab-6dbb-429c-b35f-f81cdda2088c@gmail.com>
Hi Denis,
On 18.11.24 г. 18:43 ч., Denis Kenzior wrote:
> Hi Ivo,
>
> On 11/17/24 5:04 AM, Ivaylo Dimitrov wrote:
>> ---
>> drivers/qmimodem/sim.c | 93
>> ++++++++++++++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 93 insertions(+)
>>
>> diff --git a/drivers/qmimodem/sim.c b/drivers/qmimodem/sim.c
>> index 1fffae2..b1d8f22 100644
>> --- a/drivers/qmimodem/sim.c
>> +++ b/drivers/qmimodem/sim.c
>> @@ -41,6 +41,8 @@ struct sim_status {
>> uint8_t app_type;
>> uint8_t passwd_state;
>> int retries[OFONO_SIM_PASSWORD_INVALID];
>> + uint8_t pin1_state;
>> + uint8_t pin2_state;
>> };
>> struct sim_data {
>> @@ -52,6 +54,20 @@ struct sim_data {
>> struct l_timeout *retry_timer;
>> };
>> +struct query_locked_data {
>> + enum ofono_sim_password_type passwd_type;
>> +};
>
> Why is this structure needed? Can't you simply stuff this into
> cb_data::user using L_UINT_TO_PTR and L_PTR_TO_UINT?
>
I was wondering what is GUINT_TO_POINTER() replacement in ell, however...
>> +
>> +static inline void cb_user_data_unref(void *user_data)
>> +{
>> + struct cb_data *cbd = user_data;
>> +
>> + if (cbd->ref == 1 && cbd->user)
>> + l_free(cbd->user);
>> +
>> + cb_data_unref(user_data);
>> +}
>> +
>
> That way this could also be dropped
>
I introduced that for the future (sim pin change functionality),
however, looking now at the code, I wonder why I decided it will be needed.
Will drop and resend.
Thanks and regards,
Ivo
prev parent reply other threads:[~2024-11-18 17:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-17 11:04 [PATCH] qmi: sim: Implement query_facility_lock(LockedPins property) Ivaylo Dimitrov
2024-11-18 16:43 ` Denis Kenzior
2024-11-18 17:01 ` Ivaylo Dimitrov [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=82438d23-e666-a480-e79a-ba62a3d70504@gmail.com \
--to=ivo.g.dimitrov.75@gmail.com \
--cc=absicsz@gmail.com \
--cc=denkenz@gmail.com \
--cc=merlijn@wizzup.org \
--cc=ofono@lists.linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.