Skip to content

Commit b2534c2

Browse files
Thomas RichterAlexander Gordeev
authored andcommitted
s390/cpum_sf: handle casts consistently
The casts are written in two different notations: (cast) expression and (cast)expression Convert statements with the first notation to the second notation. No functional change. Signed-off-by: Thomas Richter <tmricht@linux.ibm.com> Acked-by: Heiko Carstens <hca@linux.ibm.com> Signed-off-by: Alexander Gordeev <agordeev@linux.ibm.com>
1 parent c13166b commit b2534c2

1 file changed

Lines changed: 13 additions & 13 deletions

File tree

arch/s390/kernel/perf_cpum_sf.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
#define CPUM_SF_SDBT_TL_OFFSET (CPUM_SF_SDB_PER_TABLE * 8)
4444
static inline int require_table_link(const void *sdbt)
4545
{
46-
return ((unsigned long) sdbt & ~PAGE_MASK) == CPUM_SF_SDBT_TL_OFFSET;
46+
return ((unsigned long)sdbt & ~PAGE_MASK) == CPUM_SF_SDBT_TL_OFFSET;
4747
}
4848

4949
/* Minimum and maximum sampling buffer sizes:
@@ -192,7 +192,7 @@ static void free_sampling_buffer(struct sf_buffer *sfb)
192192
if (is_link_entry(curr)) {
193193
curr = get_next_sdbt(curr);
194194
if (sdbt)
195-
free_page((unsigned long) sdbt);
195+
free_page((unsigned long)sdbt);
196196

197197
/* If the origin is reached, sampling buffer is freed */
198198
if (curr == sfb->sdbt)
@@ -278,7 +278,7 @@ static int realloc_sampling_buffer(struct sf_buffer *sfb,
278278
for (i = 0; i < num_sdb; i++) {
279279
/* Allocate a new SDB-table if it is full. */
280280
if (require_table_link(tail)) {
281-
new = (unsigned long *) get_zeroed_page(gfp_flags);
281+
new = (unsigned long *)get_zeroed_page(gfp_flags);
282282
if (!new) {
283283
rc = -ENOMEM;
284284
break;
@@ -304,7 +304,7 @@ static int realloc_sampling_buffer(struct sf_buffer *sfb,
304304
*/
305305
if (tail_prev) {
306306
sfb->num_sdbt--;
307-
free_page((unsigned long) new);
307+
free_page((unsigned long)new);
308308
tail = tail_prev;
309309
}
310310
break;
@@ -343,7 +343,7 @@ static int alloc_sampling_buffer(struct sf_buffer *sfb, unsigned long num_sdb)
343343
return -EINVAL;
344344

345345
/* Allocate the sample-data-block-table origin */
346-
sfb->sdbt = (unsigned long *) get_zeroed_page(GFP_KERNEL);
346+
sfb->sdbt = (unsigned long *)get_zeroed_page(GFP_KERNEL);
347347
if (!sfb->sdbt)
348348
return -ENOMEM;
349349
sfb->num_sdb = 0;
@@ -597,7 +597,7 @@ static void setup_pmc_cpu(void *flags)
597597
struct cpu_hw_sf *cpusf = this_cpu_ptr(&cpu_hw_sf);
598598
int err = 0;
599599

600-
switch (*((int *) flags)) {
600+
switch (*((int *)flags)) {
601601
case PMC_INIT:
602602
memset(cpusf, 0, sizeof(*cpusf));
603603
err = qsi(&cpusf->qsi);
@@ -614,7 +614,7 @@ static void setup_pmc_cpu(void *flags)
614614
break;
615615
}
616616
if (err) {
617-
*((int *) flags) |= PMC_FAILURE;
617+
*((int *)flags) |= PMC_FAILURE;
618618
pr_err("Switching off the sampling facility failed with rc %i\n", err);
619619
}
620620
}
@@ -1214,7 +1214,7 @@ static void hw_collect_samples(struct perf_event *event, unsigned long *sdbt,
12141214

12151215
te = trailer_entry_ptr((unsigned long)sdbt);
12161216
sample = (struct hws_basic_entry *)sdbt;
1217-
while ((unsigned long *) sample < (unsigned long *) te) {
1217+
while ((unsigned long *)sample < (unsigned long *)te) {
12181218
/* Check for an empty sample */
12191219
if (!sample->def || sample->LS)
12201220
break;
@@ -1291,7 +1291,7 @@ static void hw_perf_event_update(struct perf_event *event, int flush_all)
12911291
if (SAMPL_DIAG_MODE(&event->hw))
12921292
return;
12931293

1294-
sdbt = (unsigned long *) TEAR_REG(hwc);
1294+
sdbt = (unsigned long *)TEAR_REG(hwc);
12951295
done = event_overflow = sampl_overflow = num_sdb = 0;
12961296
while (!done) {
12971297
/* Get the trailer entry of the sample-data-block */
@@ -1794,7 +1794,7 @@ static void *aux_buffer_setup(struct perf_event *event, void **pages,
17941794

17951795
/* Allocate the first SDBT */
17961796
sfb->num_sdbt = 0;
1797-
sfb->sdbt = (unsigned long *) get_zeroed_page(GFP_KERNEL);
1797+
sfb->sdbt = (unsigned long *)get_zeroed_page(GFP_KERNEL);
17981798
if (!sfb->sdbt)
17991799
goto no_sdbt;
18001800
aux->sdbt_index[sfb->num_sdbt++] = (unsigned long)sfb->sdbt;
@@ -1806,7 +1806,7 @@ static void *aux_buffer_setup(struct perf_event *event, void **pages,
18061806
*/
18071807
for (i = 0; i < nr_pages; i++, tail++) {
18081808
if (require_table_link(tail)) {
1809-
new = (unsigned long *) get_zeroed_page(GFP_KERNEL);
1809+
new = (unsigned long *)get_zeroed_page(GFP_KERNEL);
18101810
if (!new)
18111811
goto no_sdbt;
18121812
aux->sdbt_index[sfb->num_sdbt++] = (unsigned long)new;
@@ -1963,8 +1963,8 @@ static int cpumsf_pmu_add(struct perf_event *event, int flags)
19631963
cpuhw->lsctl.interval = SAMPL_RATE(&event->hw);
19641964
if (!SAMPL_DIAG_MODE(&event->hw)) {
19651965
cpuhw->lsctl.tear = virt_to_phys(cpuhw->sfb.sdbt);
1966-
cpuhw->lsctl.dear = *(unsigned long *) cpuhw->sfb.sdbt;
1967-
TEAR_REG(&event->hw) = (unsigned long) cpuhw->sfb.sdbt;
1966+
cpuhw->lsctl.dear = *(unsigned long *)cpuhw->sfb.sdbt;
1967+
TEAR_REG(&event->hw) = (unsigned long)cpuhw->sfb.sdbt;
19681968
}
19691969

19701970
/* Ensure sampling functions are in the disabled state. If disabled,

0 commit comments

Comments
 (0)