ofono.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH] gemalto: radio-settings: cleanup
@ 2021-07-23 17:00 Sergey Matyukevich
  2021-07-27 14:31 ` Denis Kenzior
  0 siblings, 1 reply; 2+ messages in thread
From: Sergey Matyukevich @ 2021-07-23 17:00 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1243 bytes --]

Enum ofono_radio_access_mode has been replaced by unsigned int.
This change allows to move handling of all the modes into
'switch' in the function gemalto_set_rat_mode.
---
 drivers/gemaltomodem/radio-settings.c | 15 ++++++---------
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/drivers/gemaltomodem/radio-settings.c b/drivers/gemaltomodem/radio-settings.c
index 738a6908..50764f83 100644
--- a/drivers/gemaltomodem/radio-settings.c
+++ b/drivers/gemaltomodem/radio-settings.c
@@ -171,21 +171,18 @@ static void gemalto_set_rat_mode(struct ofono_radio_settings *rs,
 	case OFONO_RADIO_ACCESS_MODE_LTE:
 		val = 3;
 		break;
-	}
-
-	if (m == (OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM)) {
+	case OFONO_RADIO_ACCESS_MODE_UMTS|OFONO_RADIO_ACCESS_MODE_GSM:
 		val = 1;
 		p1 = 2;
-	}
-
-	if (m == (OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS)) {
+		break;
+	case OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_UMTS:
 		val = 4;
 		p1 = 3;
-	}
-
-	if (m == (OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_GSM)) {
+		break;
+	case OFONO_RADIO_ACCESS_MODE_LTE|OFONO_RADIO_ACCESS_MODE_GSM:
 		val = 5;
 		p1 = 3;
+		break;
 	}
 
 	if (val == 6)
-- 
2.32.0

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] gemalto: radio-settings: cleanup
  2021-07-23 17:00 [PATCH] gemalto: radio-settings: cleanup Sergey Matyukevich
@ 2021-07-27 14:31 ` Denis Kenzior
  0 siblings, 0 replies; 2+ messages in thread
From: Denis Kenzior @ 2021-07-27 14:31 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 408 bytes --]

Hi Sergey,

On 7/23/21 12:00 PM, Sergey Matyukevich wrote:
> Enum ofono_radio_access_mode has been replaced by unsigned int.
> This change allows to move handling of all the modes into
> 'switch' in the function gemalto_set_rat_mode.
> ---
>   drivers/gemaltomodem/radio-settings.c | 15 ++++++---------
>   1 file changed, 6 insertions(+), 9 deletions(-)
> 

Applied, thanks.

Regards,
-Denis

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-07-27 14:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23 17:00 [PATCH] gemalto: radio-settings: cleanup Sergey Matyukevich
2021-07-27 14:31 ` Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).