* "[PATCH
@ 2005-04-26 10:38 Vincent Hanquez
2005-04-26 11:29 ` [PATCH 4/6][XEN][x86] Use more usermode macro Vincent Hanquez
0 siblings, 1 reply; 10+ messages in thread
From: Vincent Hanquez @ 2005-04-26 10:38 UTC (permalink / raw)
To: 4/6][XEN], [x86], akpm, , <ian.pratt@cl.cam.ac.uk>,,
<vincent.hanquez@cl.cam.ac.uk>,
Andrew, Hanquez, linux-kernel, macro, ,
more, Morton, Pratt, use, usermode, Vincent
Cc: Ian
Hi,
The following patch use the user_mode macro where it's possible.
Please apply, or comments.
Signed-off-by: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/process.c linux-2.6.12-rc3.2/arch/i386/kernel/process.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/process.c 2005-04-22 12:10:22.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/process.c 2005-04-25 16:09:25.000000000 +0100
@@ -262,7 +262,7 @@
printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
print_symbol("EIP is at %s\n", regs->eip);
- if (regs->xcs & 3)
+ if (user_mode(regs))
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s)\n",
regs->eflags, print_tainted(), system_utsname.release);
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/signal.c linux-2.6.12-rc3.2/arch/i386/kernel/signal.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/signal.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/signal.c 2005-04-25 16:09:53.000000000 +0100
@@ -599,7 +599,7 @@
* kernel mode. Just return without doing anything
* if so.
*/
- if ((regs->xcs & 3) != 3)
+ if (!user_mode(regs))
return 1;
if (current->flags & PF_FREEZE) {
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/traps.c linux-2.6.12-rc3.2/arch/i386/kernel/traps.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/traps.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/traps.c 2005-04-25 16:12:34.000000000 +0100
@@ -209,7 +209,7 @@
esp = (unsigned long) (®s->esp);
ss = __KERNEL_DS;
- if (regs->xcs & 3) {
+ if (user_mode(regs)) {
in_kernel = 0;
esp = regs->esp;
ss = regs->xss & 0xffff;
@@ -265,7 +265,7 @@
char c;
unsigned long eip;
- if (regs->xcs & 3)
+ if (user_mode(regs))
goto no_bug; /* Not in kernel */
eip = regs->eip;
@@ -353,7 +353,7 @@
static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err)
{
- if (!(regs->eflags & VM_MASK) && !(3 & regs->xcs))
+ if (!user_mode_vm(regs))
die(str, regs, err);
}
@@ -366,7 +366,7 @@
goto trap_signal;
}
- if (!(regs->xcs & 3))
+ if (!user_mode(regs))
goto kernel_trap;
trap_signal: {
@@ -487,7 +487,7 @@
if (regs->eflags & VM_MASK)
goto gp_in_vm86;
- if (!(regs->xcs & 3))
+ if (!user_mode(regs))
goto gp_in_kernel;
current->thread.error_code = error_code;
@@ -713,7 +713,7 @@
* check for kernel mode by just checking the CPL
* of CS.
*/
- if ((regs->xcs & 3) == 0)
+ if (!user_mode(regs))
goto clear_TF_reenable;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH 4/6][XEN][x86] Use more usermode macro
2005-04-26 10:38 "[PATCH Vincent Hanquez
@ 2005-04-26 11:29 ` Vincent Hanquez
0 siblings, 0 replies; 10+ messages in thread
From: Vincent Hanquez @ 2005-04-26 11:29 UTC (permalink / raw)
To: linux-kernel; +Cc: ian.pratt, akpm
Hi,
The following patch use the user_mode macro where it's possible.
ignore my previous mail, really sorry for the noise.
Please apply, or comments.
Signed-off-by: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/process.c linux-2.6.12-rc3.2/arch/i386/kernel/process.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/process.c 2005-04-22 12:10:22.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/process.c 2005-04-25 16:09:25.000000000 +0100
@@ -262,7 +262,7 @@
printk("EIP: %04x:[<%08lx>] CPU: %d\n",0xffff & regs->xcs,regs->eip, smp_processor_id());
print_symbol("EIP is at %s\n", regs->eip);
- if (regs->xcs & 3)
+ if (user_mode(regs))
printk(" ESP: %04x:%08lx",0xffff & regs->xss,regs->esp);
printk(" EFLAGS: %08lx %s (%s)\n",
regs->eflags, print_tainted(), system_utsname.release);
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/signal.c linux-2.6.12-rc3.2/arch/i386/kernel/signal.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/signal.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/signal.c 2005-04-25 16:09:53.000000000 +0100
@@ -599,7 +599,7 @@
* kernel mode. Just return without doing anything
* if so.
*/
- if ((regs->xcs & 3) != 3)
+ if (!user_mode(regs))
return 1;
if (current->flags & PF_FREEZE) {
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/traps.c linux-2.6.12-rc3.2/arch/i386/kernel/traps.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/traps.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/traps.c 2005-04-25 16:12:34.000000000 +0100
@@ -209,7 +209,7 @@
esp = (unsigned long) (®s->esp);
ss = __KERNEL_DS;
- if (regs->xcs & 3) {
+ if (user_mode(regs)) {
in_kernel = 0;
esp = regs->esp;
ss = regs->xss & 0xffff;
@@ -265,7 +265,7 @@
char c;
unsigned long eip;
- if (regs->xcs & 3)
+ if (user_mode(regs))
goto no_bug; /* Not in kernel */
eip = regs->eip;
@@ -353,7 +353,7 @@
static inline void die_if_kernel(const char * str, struct pt_regs * regs, long err)
{
- if (!(regs->eflags & VM_MASK) && !(3 & regs->xcs))
+ if (!user_mode_vm(regs))
die(str, regs, err);
}
@@ -366,7 +366,7 @@
goto trap_signal;
}
- if (!(regs->xcs & 3))
+ if (!user_mode(regs))
goto kernel_trap;
trap_signal: {
@@ -487,7 +487,7 @@
if (regs->eflags & VM_MASK)
goto gp_in_vm86;
- if (!(regs->xcs & 3))
+ if (!user_mode(regs))
goto gp_in_kernel;
current->thread.error_code = error_code;
@@ -713,7 +713,7 @@
* check for kernel mode by just checking the CPL
* of CS.
*/
- if ((regs->xcs & 3) == 0)
+ if (!user_mode(regs))
goto clear_TF_reenable;
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH
2023-10-08 2:10 [PATCH Pavan Bobba
` (2 preceding siblings ...)
2023-10-08 2:10 ` [PATCH Pavan Bobba
@ 2023-10-08 2:13 ` opensource india
3 siblings, 0 replies; 10+ messages in thread
From: opensource india @ 2023-10-08 2:13 UTC (permalink / raw)
To: Pavan Bobba, Greg Kroah-Hartman, linux-staging, linux-kernel
Please ignore all of the below patches. I will send it again. this is
a test mail i sent to my own id..but by mistake i sent to all of you
On Sun, Oct 8, 2023 at 7:41 AM Pavan Bobba <opensource206@gmail.com> wrote:
>
> *** BLURB HERE ***
>
> Pavan Bobba (3):
> staging: vt6655: Type encoding info dropped from array name "abyBBVGA"
> staging: vt6655: Type encoding info dropped from variable name
> "byBBVGACurrent"
> staging: vt6655: Type encoding info dropped from variable name
> "byBBVGANew"
>
> drivers/staging/vt6655/baseband.c | 40 ++++++++++++++--------------
> drivers/staging/vt6655/channel.c | 6 ++---
> drivers/staging/vt6655/device.h | 6 ++---
> drivers/staging/vt6655/device_main.c | 24 ++++++++---------
> 4 files changed, 38 insertions(+), 38 deletions(-)
>
> --
> 2.34.1
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH
2023-10-08 2:10 [PATCH Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
@ 2023-10-08 2:10 ` Pavan Bobba
2023-10-08 2:13 ` [PATCH opensource india
3 siblings, 0 replies; 10+ messages in thread
From: Pavan Bobba @ 2023-10-08 2:10 UTC (permalink / raw)
To: Pavan Bobba, Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Pavan Bobba
variable name "byBBVGANew" updated like below:
a.type encoding info dropped from name
b.camelcase name replaced by snakecase
Issue found by checkpatch
Signed-off-by: Pavan Bobba <opensource206@gmail.com>
---
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 14 +++++++-------
2 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 9ae7171d02ee..68bfadacfa7c 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -248,7 +248,7 @@ struct vnt_private {
/* For Update BaseBand VGA Gain Offset */
bool bUpdateBBVGA;
unsigned int uBBVGADiffCount;
- unsigned char byBBVGANew;
+ unsigned char bbvga_new;
unsigned char bbvga_current;
unsigned char bbvga[BB_VGA_LEVEL];
long dbm_threshold[BB_VGA_LEVEL];
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 6990129ceb10..b08fcf7e6edc 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -425,7 +425,7 @@ static void device_init_registers(struct vnt_private *priv)
if (priv->bUpdateBBVGA) {
priv->bbvga_current = priv->bbvga[0];
- priv->byBBVGANew = priv->bbvga_current;
+ priv->bbvga_new = priv->bbvga_current;
bb_set_vga_gain_offset(priv, priv->bbvga[0]);
}
@@ -1053,12 +1053,12 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
for (i = 0; i < BB_VGA_LEVEL; i++) {
if (dbm < priv->dbm_threshold[i]) {
- priv->byBBVGANew = priv->bbvga[i];
+ priv->bbvga_new = priv->bbvga[i];
break;
}
}
- if (priv->byBBVGANew == priv->bbvga_current) {
+ if (priv->bbvga_new == priv->bbvga_current) {
priv->uBBVGADiffCount = 1;
return;
}
@@ -1067,11 +1067,11 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
if (priv->uBBVGADiffCount == 1) {
/* first VGA diff gain */
- bb_set_vga_gain_offset(priv, priv->byBBVGANew);
+ bb_set_vga_gain_offset(priv, priv->bbvga_new);
dev_dbg(&priv->pcid->dev,
"First RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n",
- (int)dbm, priv->byBBVGANew,
+ (int)dbm, priv->bbvga_new,
priv->bbvga_current,
(int)priv->uBBVGADiffCount);
}
@@ -1079,11 +1079,11 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
if (priv->uBBVGADiffCount >= BB_VGA_CHANGE_THRESHOLD) {
dev_dbg(&priv->pcid->dev,
"RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n",
- (int)dbm, priv->byBBVGANew,
+ (int)dbm, priv->bbvga_new,
priv->bbvga_current,
(int)priv->uBBVGADiffCount);
- bb_set_vga_gain_offset(priv, priv->byBBVGANew);
+ bb_set_vga_gain_offset(priv, priv->bbvga_new);
}
}
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH
2023-10-08 2:10 [PATCH Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
@ 2023-10-08 2:10 ` Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
2023-10-08 2:13 ` [PATCH opensource india
3 siblings, 0 replies; 10+ messages in thread
From: Pavan Bobba @ 2023-10-08 2:10 UTC (permalink / raw)
To: Pavan Bobba, Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Pavan Bobba
variable name "byBBVGACurrent" updated like below:
a.type encoding info dropped from name
b.camelcase name replaced by snakecase
Issue found by checkpatch
Signed-off-by: Pavan Bobba <opensource206@gmail.com>
---
drivers/staging/vt6655/baseband.c | 2 +-
drivers/staging/vt6655/channel.c | 6 +++---
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 10 +++++-----
4 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index a19a75f5d761..7d47b266b87e 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -2146,7 +2146,7 @@ void bb_set_vga_gain_offset(struct vnt_private *priv, unsigned char by_data)
by_bb_rx_conf &= 0xDF; /* 1101 1111 */
else
by_bb_rx_conf |= 0x20; /* 0010 0000 */
- priv->byBBVGACurrent = by_data;
+ priv->bbvga_current = by_data;
bb_write_embedded(priv, 0x0A, by_bb_rx_conf); /* CR10 */
}
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index e20701815db9..6ac7d470c041 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -87,10 +87,10 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
/* Set VGA to max sensitivity */
if (priv->bUpdateBBVGA &&
- priv->byBBVGACurrent != priv->bbvga[0]) {
- priv->byBBVGACurrent = priv->bbvga[0];
+ priv->bbvga_current != priv->bbvga[0]) {
+ priv->bbvga_current = priv->bbvga[0];
- bb_set_vga_gain_offset(priv, priv->byBBVGACurrent);
+ bb_set_vga_gain_offset(priv, priv->bbvga_current);
}
/* clear NAV */
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index b662c74a2dc7..9ae7171d02ee 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -249,7 +249,7 @@ struct vnt_private {
bool bUpdateBBVGA;
unsigned int uBBVGADiffCount;
unsigned char byBBVGANew;
- unsigned char byBBVGACurrent;
+ unsigned char bbvga_current;
unsigned char bbvga[BB_VGA_LEVEL];
long dbm_threshold[BB_VGA_LEVEL];
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index 385848df8848..6990129ceb10 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -424,8 +424,8 @@ static void device_init_registers(struct vnt_private *priv)
bb_vt3253_init(priv);
if (priv->bUpdateBBVGA) {
- priv->byBBVGACurrent = priv->bbvga[0];
- priv->byBBVGANew = priv->byBBVGACurrent;
+ priv->bbvga_current = priv->bbvga[0];
+ priv->byBBVGANew = priv->bbvga_current;
bb_set_vga_gain_offset(priv, priv->bbvga[0]);
}
@@ -1058,7 +1058,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
}
}
- if (priv->byBBVGANew == priv->byBBVGACurrent) {
+ if (priv->byBBVGANew == priv->bbvga_current) {
priv->uBBVGADiffCount = 1;
return;
}
@@ -1072,7 +1072,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
dev_dbg(&priv->pcid->dev,
"First RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n",
(int)dbm, priv->byBBVGANew,
- priv->byBBVGACurrent,
+ priv->bbvga_current,
(int)priv->uBBVGADiffCount);
}
@@ -1080,7 +1080,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
dev_dbg(&priv->pcid->dev,
"RSSI[%d] NewGain[%d] OldGain[%d] Count[%d]\n",
(int)dbm, priv->byBBVGANew,
- priv->byBBVGACurrent,
+ priv->bbvga_current,
(int)priv->uBBVGADiffCount);
bb_set_vga_gain_offset(priv, priv->byBBVGANew);
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH
2023-10-08 2:10 [PATCH Pavan Bobba
@ 2023-10-08 2:10 ` Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
` (2 subsequent siblings)
3 siblings, 0 replies; 10+ messages in thread
From: Pavan Bobba @ 2023-10-08 2:10 UTC (permalink / raw)
To: Pavan Bobba, Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Pavan Bobba
array name "abyBBVGA" updated like below:
a.type encoding info dropped from name
b.camelcase name replaced by snakecase
Issue found by checkpatch
Signed-off-by: Pavan Bobba <opensource206@gmail.com>
---
drivers/staging/vt6655/baseband.c | 38 ++++++++++++++--------------
drivers/staging/vt6655/channel.c | 4 +--
drivers/staging/vt6655/device.h | 2 +-
drivers/staging/vt6655/device_main.c | 8 +++---
4 files changed, 26 insertions(+), 26 deletions(-)
diff --git a/drivers/staging/vt6655/baseband.c b/drivers/staging/vt6655/baseband.c
index 0ae2ab3987c6..a19a75f5d761 100644
--- a/drivers/staging/vt6655/baseband.c
+++ b/drivers/staging/vt6655/baseband.c
@@ -2016,10 +2016,10 @@ bool bb_vt3253_init(struct vnt_private *priv)
iowrite32(0x23, iobase + MAC_REG_ITRTMSET);
vt6655_mac_reg_bits_on(iobase, MAC_REG_PAPEDELAY, BIT(0));
}
- priv->abyBBVGA[0] = 0x18;
- priv->abyBBVGA[1] = 0x0A;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bbvga[0] = 0x18;
+ priv->bbvga[1] = 0x0A;
+ priv->bbvga[2] = 0x0;
+ priv->bbvga[3] = 0x0;
priv->dbm_threshold[0] = -70;
priv->dbm_threshold[1] = -50;
priv->dbm_threshold[2] = 0;
@@ -2034,10 +2034,10 @@ bool bb_vt3253_init(struct vnt_private *priv)
result &= bb_write_embedded(priv,
vt3253b0_agc[ii][0], vt3253b0_agc[ii][1]);
- priv->abyBBVGA[0] = 0x1C;
- priv->abyBBVGA[1] = 0x10;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bbvga[0] = 0x1C;
+ priv->bbvga[1] = 0x10;
+ priv->bbvga[2] = 0x0;
+ priv->bbvga[3] = 0x0;
priv->dbm_threshold[0] = -70;
priv->dbm_threshold[1] = -48;
priv->dbm_threshold[2] = 0;
@@ -2056,10 +2056,10 @@ bool bb_vt3253_init(struct vnt_private *priv)
iowrite8(0x23, iobase + MAC_REG_ITRTMSET);
vt6655_mac_reg_bits_on(iobase, MAC_REG_PAPEDELAY, BIT(0));
- priv->abyBBVGA[0] = 0x14;
- priv->abyBBVGA[1] = 0x0A;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bbvga[0] = 0x14;
+ priv->bbvga[1] = 0x0A;
+ priv->bbvga[2] = 0x0;
+ priv->bbvga[3] = 0x0;
priv->dbm_threshold[0] = -60;
priv->dbm_threshold[1] = -50;
priv->dbm_threshold[2] = 0;
@@ -2074,10 +2074,10 @@ bool bb_vt3253_init(struct vnt_private *priv)
result &= bb_write_embedded(priv,
vt3253b0_agc[ii][0], vt3253b0_agc[ii][1]);
- priv->abyBBVGA[0] = 0x1C;
- priv->abyBBVGA[1] = 0x10;
- priv->abyBBVGA[2] = 0x0;
- priv->abyBBVGA[3] = 0x0;
+ priv->bbvga[0] = 0x1C;
+ priv->bbvga[1] = 0x10;
+ priv->bbvga[2] = 0x0;
+ priv->bbvga[3] = 0x0;
priv->dbm_threshold[0] = -70;
priv->dbm_threshold[1] = -48;
priv->dbm_threshold[2] = 0;
@@ -2088,7 +2088,7 @@ bool bb_vt3253_init(struct vnt_private *priv)
} else {
/* No VGA Table now */
priv->bUpdateBBVGA = false;
- priv->abyBBVGA[0] = 0x1C;
+ priv->bbvga[0] = 0x1C;
}
if (by_local_id > REV_ID_VT3253_A1) {
@@ -2126,7 +2126,7 @@ bb_set_short_slot_time(struct vnt_private *priv)
/* patch for 3253B0 Baseband with Cardbus module */
bb_read_embedded(priv, 0xE7, &by_bb_vga);
- if (by_bb_vga == priv->abyBBVGA[0])
+ if (by_bb_vga == priv->bbvga[0])
by_bb_rx_conf |= 0x20; /* 0010 0000 */
bb_write_embedded(priv, 0x0A, by_bb_rx_conf); /* CR10 */
@@ -2140,7 +2140,7 @@ void bb_set_vga_gain_offset(struct vnt_private *priv, unsigned char by_data)
bb_read_embedded(priv, 0x0A, &by_bb_rx_conf); /* CR10 */
/* patch for 3253B0 Baseband with Cardbus module */
- if (by_data == priv->abyBBVGA[0])
+ if (by_data == priv->bbvga[0])
by_bb_rx_conf |= 0x20; /* 0010 0000 */
else if (priv->short_slot_time)
by_bb_rx_conf &= 0xDF; /* 1101 1111 */
diff --git a/drivers/staging/vt6655/channel.c b/drivers/staging/vt6655/channel.c
index e90e0b43505d..e20701815db9 100644
--- a/drivers/staging/vt6655/channel.c
+++ b/drivers/staging/vt6655/channel.c
@@ -87,8 +87,8 @@ bool set_channel(struct vnt_private *priv, struct ieee80211_channel *ch)
/* Set VGA to max sensitivity */
if (priv->bUpdateBBVGA &&
- priv->byBBVGACurrent != priv->abyBBVGA[0]) {
- priv->byBBVGACurrent = priv->abyBBVGA[0];
+ priv->byBBVGACurrent != priv->bbvga[0]) {
+ priv->byBBVGACurrent = priv->bbvga[0];
bb_set_vga_gain_offset(priv, priv->byBBVGACurrent);
}
diff --git a/drivers/staging/vt6655/device.h b/drivers/staging/vt6655/device.h
index 8c90539cc3d7..b662c74a2dc7 100644
--- a/drivers/staging/vt6655/device.h
+++ b/drivers/staging/vt6655/device.h
@@ -250,7 +250,7 @@ struct vnt_private {
unsigned int uBBVGADiffCount;
unsigned char byBBVGANew;
unsigned char byBBVGACurrent;
- unsigned char abyBBVGA[BB_VGA_LEVEL];
+ unsigned char bbvga[BB_VGA_LEVEL];
long dbm_threshold[BB_VGA_LEVEL];
unsigned char byBBPreEDRSSI;
diff --git a/drivers/staging/vt6655/device_main.c b/drivers/staging/vt6655/device_main.c
index f76f482f4c06..385848df8848 100644
--- a/drivers/staging/vt6655/device_main.c
+++ b/drivers/staging/vt6655/device_main.c
@@ -424,9 +424,9 @@ static void device_init_registers(struct vnt_private *priv)
bb_vt3253_init(priv);
if (priv->bUpdateBBVGA) {
- priv->byBBVGACurrent = priv->abyBBVGA[0];
+ priv->byBBVGACurrent = priv->bbvga[0];
priv->byBBVGANew = priv->byBBVGACurrent;
- bb_set_vga_gain_offset(priv, priv->abyBBVGA[0]);
+ bb_set_vga_gain_offset(priv, priv->bbvga[0]);
}
bb_set_rx_antenna_mode(priv, priv->byRxAntennaMode);
@@ -1053,7 +1053,7 @@ static void vnt_check_bb_vga(struct vnt_private *priv)
for (i = 0; i < BB_VGA_LEVEL; i++) {
if (dbm < priv->dbm_threshold[i]) {
- priv->byBBVGANew = priv->abyBBVGA[i];
+ priv->byBBVGANew = priv->bbvga[i];
break;
}
}
@@ -1510,7 +1510,7 @@ static void vnt_bss_info_changed(struct ieee80211_hw *hw,
priv->short_slot_time = false;
CARDbSetPhyParameter(priv, priv->byBBType);
- bb_set_vga_gain_offset(priv, priv->abyBBVGA[0]);
+ bb_set_vga_gain_offset(priv, priv->bbvga[0]);
}
if (changed & BSS_CHANGED_TXPOWER)
--
2.34.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH
@ 2023-10-08 2:10 Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
` (3 more replies)
0 siblings, 4 replies; 10+ messages in thread
From: Pavan Bobba @ 2023-10-08 2:10 UTC (permalink / raw)
To: Pavan Bobba, Greg Kroah-Hartman, linux-staging, linux-kernel; +Cc: Pavan Bobba
*** BLURB HERE ***
Pavan Bobba (3):
staging: vt6655: Type encoding info dropped from array name "abyBBVGA"
staging: vt6655: Type encoding info dropped from variable name
"byBBVGACurrent"
staging: vt6655: Type encoding info dropped from variable name
"byBBVGANew"
drivers/staging/vt6655/baseband.c | 40 ++++++++++++++--------------
drivers/staging/vt6655/channel.c | 6 ++---
drivers/staging/vt6655/device.h | 6 ++---
drivers/staging/vt6655/device_main.c | 24 ++++++++---------
4 files changed, 38 insertions(+), 38 deletions(-)
--
2.34.1
^ permalink raw reply [flat|nested] 10+ messages in thread
* "[PATCH
@ 2005-04-26 10:38 Vincent Hanquez
0 siblings, 0 replies; 10+ messages in thread
From: Vincent Hanquez @ 2005-04-26 10:38 UTC (permalink / raw)
To: 3/6][XEN], [x86], akpm, , <ian.pratt@cl.cam.ac.uk>,,
<vincent.hanquez@cl.cam.ac.uk>,
Andrew, Hanquez, linux-kernel, macro, ,
Morton, Pratt, rename, usermode, Vincent
Cc: Ian
Hi,
The following patch rename user_mode to user_mode_vm and add a user_mode macro
similar to the x86-64 one.
This is useful for Xen because the linux xen kernel does not runs on the same
priviledge that a vanilla linux kernel, and with this we just need to redefine
user_mode().
Please apply, or comments.
Signed-off-by: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
diff -Naur linux-2.6.12-rc3/arch/i386/kernel/apic.c linux-2.6.12-rc3.1/arch/i386/kernel/apic.c
--- linux-2.6.12-rc3/arch/i386/kernel/apic.c 2005-04-21 11:45:45.000000000 +0100
+++ linux-2.6.12-rc3.1/arch/i386/kernel/apic.c 2005-04-25 18:13:00.000000000 +0100
@@ -1133,7 +1133,7 @@
}
#ifdef CONFIG_SMP
- update_process_times(user_mode(regs));
+ update_process_times(user_mode_vm(regs));
#endif
}
diff -Naur linux-2.6.12-rc3/arch/i386/kernel/ptrace.c linux-2.6.12-rc3.1/arch/i386/kernel/ptrace.c
--- linux-2.6.12-rc3/arch/i386/kernel/ptrace.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.1/arch/i386/kernel/ptrace.c 2005-04-25 18:12:39.000000000 +0100
@@ -667,7 +667,7 @@
info.si_code = TRAP_BRKPT;
/* User-mode eip? */
- info.si_addr = user_mode(regs) ? (void __user *) regs->eip : NULL;
+ info.si_addr = user_mode_vm(regs) ? (void __user *) regs->eip : NULL;
/* Send us the fakey SIGTRAP */
force_sig_info(SIGTRAP, &info, tsk);
diff -Naur linux-2.6.12-rc3/arch/i386/mach-voyager/voyager_smp.c linux-2.6.12-rc3.1/arch/i386/mach-voyager/voyager_smp.c
--- linux-2.6.12-rc3/arch/i386/mach-voyager/voyager_smp.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.1/arch/i386/mach-voyager/voyager_smp.c 2005-04-25 18:13:12.000000000 +0100
@@ -1289,7 +1289,7 @@
per_cpu(prof_counter, cpu);
}
- update_process_times(user_mode(regs));
+ update_process_times(user_mode_vm(regs));
}
if( ((1<<cpu) & voyager_extended_vic_processors) == 0)
diff -Naur linux-2.6.12-rc3/arch/i386/oprofile/backtrace.c linux-2.6.12-rc3.1/arch/i386/oprofile/backtrace.c
--- linux-2.6.12-rc3/arch/i386/oprofile/backtrace.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.1/arch/i386/oprofile/backtrace.c 2005-04-25 18:13:21.000000000 +0100
@@ -91,7 +91,7 @@
head = (struct frame_head *)regs->ebp;
#endif
- if (!user_mode(regs)) {
+ if (!user_mode_vm(regs)) {
while (depth-- && valid_kernel_stack(head, regs))
head = dump_backtrace(head);
return;
diff -Naur linux-2.6.12-rc3/include/asm-i386/ptrace.h linux-2.6.12-rc3.1/include/asm-i386/ptrace.h
--- linux-2.6.12-rc3/include/asm-i386/ptrace.h 2005-03-02 07:37:48.000000000 +0000
+++ linux-2.6.12-rc3.1/include/asm-i386/ptrace.h 2005-04-25 17:05:54.000000000 +0100
@@ -57,7 +57,8 @@
#ifdef __KERNEL__
struct task_struct;
extern void send_sigtrap(struct task_struct *tsk, struct pt_regs *regs, int error_code);
-#define user_mode(regs) ((VM_MASK & (regs)->eflags) || (3 & (regs)->xcs))
+#define user_mode(regs) (3 & (regs)->xcs)
+#define user_mode_vm(regs) ((VM_MASK & (regs)->eflags) || user_mode(regs))
#define instruction_pointer(regs) ((regs)->eip)
#if defined(CONFIG_SMP) && defined(CONFIG_FRAME_POINTER)
extern unsigned long profile_pc(struct pt_regs *regs);
^ permalink raw reply [flat|nested] 10+ messages in thread
* "[PATCH
@ 2005-04-26 10:38 Vincent Hanquez
0 siblings, 0 replies; 10+ messages in thread
From: Vincent Hanquez @ 2005-04-26 10:38 UTC (permalink / raw)
To: 2/6][XEN], [x86], akpm, , <ian.pratt@cl.cam.ac.uk>,,
<vincent.hanquez@cl.cam.ac.uk>, Andrew, debugreg, ,
for, Hanquez, linux-kernel@vger.kernel.org, macro, Morton, new,
Pratt, use, Vincent
Cc: Ian
Hi,
The following patch make use of the 2 new macro cpu_set_debugreg and
cpu_get_debugreg.
as well, I can regenerate a patch keeping loaddebug if you folks seems
that is necessary or better.
Please apply, or comments.
Signed-off-by: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/cpu/common.c linux-2.6.12-rc3.2/arch/i386/kernel/cpu/common.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/cpu/common.c 2005-04-21 11:45:45.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/cpu/common.c 2005-04-22 12:10:11.000000000 +0100
@@ -631,7 +631,7 @@
/* Clear all 6 debug registers: */
-#define CD(register) __asm__("movl %0,%%db" #register ::"r"(0) );
+#define CD(register) cpu_set_debugreg(0, register)
CD(0); CD(1); CD(2); CD(3); /* no db4 and db5 */; CD(6); CD(7);
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/process.c linux-2.6.12-rc3.2/arch/i386/kernel/process.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/process.c 2005-04-22 12:10:22.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/process.c 2005-04-22 13:53:54.000000000 +0100
@@ -626,13 +626,13 @@
* Now maybe reload the debug registers
*/
if (unlikely(next->debugreg[7])) {
- loaddebug(next, 0);
- loaddebug(next, 1);
- loaddebug(next, 2);
- loaddebug(next, 3);
+ cpu_set_debugreg(current->thread.debugreg[0], 0);
+ cpu_set_debugreg(current->thread.debugreg[1], 1);
+ cpu_set_debugreg(current->thread.debugreg[2], 2);
+ cpu_set_debugreg(current->thread.debugreg[3], 3);
/* no 4 and 5 */
- loaddebug(next, 6);
- loaddebug(next, 7);
+ cpu_set_debugreg(current->thread.debugreg[6], 6);
+ cpu_set_debugreg(current->thread.debugreg[7], 7);
}
if (unlikely(prev->io_bitmap_ptr || next->io_bitmap_ptr))
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/signal.c linux-2.6.12-rc3.2/arch/i386/kernel/signal.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/signal.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/signal.c 2005-04-22 12:10:11.000000000 +0100
@@ -618,7 +618,7 @@
* inside the kernel.
*/
if (unlikely(current->thread.debugreg[7])) {
- loaddebug(¤t->thread, 7);
+ cpu_set_debugreg(current->thread.debugreg[7], 7);
}
/* Whee! Actually deliver the signal. */
diff -Naur linux-2.6.12-rc3.1/arch/i386/kernel/traps.c linux-2.6.12-rc3.2/arch/i386/kernel/traps.c
--- linux-2.6.12-rc3.1/arch/i386/kernel/traps.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/kernel/traps.c 2005-04-22 12:10:11.000000000 +0100
@@ -682,7 +682,7 @@
unsigned int condition;
struct task_struct *tsk = current;
- __asm__ __volatile__("movl %%db6,%0" : "=r" (condition));
+ cpu_get_debugreg(condition, 6);
if (notify_die(DIE_DEBUG, "debug", regs, condition, error_code,
SIGTRAP) == NOTIFY_STOP)
@@ -724,9 +724,7 @@
* the signal is delivered.
*/
clear_dr7:
- __asm__("movl %0,%%db7"
- : /* no output */
- : "r" (0));
+ cpu_set_debugreg(0, 7);
return;
debug_vm86:
diff -Naur linux-2.6.12-rc3.1/arch/i386/power/cpu.c linux-2.6.12-rc3.2/arch/i386/power/cpu.c
--- linux-2.6.12-rc3.1/arch/i386/power/cpu.c 2005-04-21 11:45:46.000000000 +0100
+++ linux-2.6.12-rc3.2/arch/i386/power/cpu.c 2005-04-22 12:10:11.000000000 +0100
@@ -94,13 +94,13 @@
* Now maybe reload the debug registers
*/
if (current->thread.debugreg[7]){
- loaddebug(¤t->thread, 0);
- loaddebug(¤t->thread, 1);
- loaddebug(¤t->thread, 2);
- loaddebug(¤t->thread, 3);
- /* no 4 and 5 */
- loaddebug(¤t->thread, 6);
- loaddebug(¤t->thread, 7);
+ cpu_set_debugreg(current->thread.debugreg[0], 0);
+ cpu_set_debugreg(current->thread.debugreg[1], 1);
+ cpu_set_debugreg(current->thread.debugreg[2], 2);
+ cpu_set_debugreg(current->thread.debugreg[3], 3);
+ /* no 4 and 5 */
+ cpu_set_debugreg(current->thread.debugreg[6], 6);
+ cpu_set_debugreg(current->thread.debugreg[7], 7);
}
}
^ permalink raw reply [flat|nested] 10+ messages in thread
* "[PATCH
@ 2005-04-26 10:38 Vincent Hanquez
0 siblings, 0 replies; 10+ messages in thread
From: Vincent Hanquez @ 2005-04-26 10:38 UTC (permalink / raw)
To: 1/6][XEN], [x86], akpm, , <ian.pratt@cl.cam.ac.uk>,,
<vincent.hanquez@cl.cam.ac.uk>, add, Andrew, debugreg, ,
for, Hanquez, linux-kernel@vger.kernel.org, macro, Morton, Pratt,
Vincent
Cc: Ian
Hi,
The following patch add 2 macros to set and get debugreg on x86.
This is useful for Xen because it will need only to redefine each macro
to a hypervisor call.
I can regenerate a patch keeping loaddebug if you folks seems that is
necessary or better.
Please apply, or comments.
Signed-off-by: Vincent Hanquez <vincent.hanquez@cl.cam.ac.uk>
diff -Naur linux-2.6.12-rc3/include/asm-i386/processor.h linux-2.6.12-rc3.1/include/asm-i386/processor.h
--- linux-2.6.12-rc3/include/asm-i386/processor.h 2005-04-21 11:46:10.000000000 +0100
+++ linux-2.6.12-rc3.1/include/asm-i386/processor.h 2005-04-22 12:09:43.000000000 +0100
@@ -501,12 +501,16 @@
} while (0)
/*
- * This special macro can be used to load a debugging register
+ * These special macros can be used to get or set a debugging register
*/
-#define loaddebug(thread,register) \
- __asm__("movl %0,%%db" #register \
- : /* no output */ \
- :"r" ((thread)->debugreg[register]))
+#define cpu_get_debugreg(var, register) \
+ __asm__("movl %%db" #register ", %0" \
+ :"=r" (var))
+#define cpu_set_debugreg(value, register) \
+ __asm__("movl %0,%%db" #register \
+ : /* no output */ \
+ :"r" (value))
+
/* Forward declaration, a strange C thing */
struct task_struct;
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2023-10-08 2:13 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-26 10:38 "[PATCH Vincent Hanquez
2005-04-26 11:29 ` [PATCH 4/6][XEN][x86] Use more usermode macro Vincent Hanquez
-- strict thread matches above, loose matches on Subject: below --
2023-10-08 2:10 [PATCH Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
2023-10-08 2:10 ` [PATCH Pavan Bobba
2023-10-08 2:13 ` [PATCH opensource india
2005-04-26 10:38 "[PATCH Vincent Hanquez
2005-04-26 10:38 "[PATCH Vincent Hanquez
2005-04-26 10:38 "[PATCH Vincent Hanquez
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).